In part of my application i have some custom settings for visitors. When user load page i try to check custom settings for request and if settings exist i do customization in page.
i do it in Template Context Processor
def shared_values(request):
show_help = request.session.get('show_help', True)
return {
'show_help': show_help,
}
It's work perfect, but i have problem - each time, when i check session django create new entry in Session table if entry does not exist before.
How can i check session without creating new one?
Edit 1:
Then i disable checking for session key, i see what django does not create any Session entry for requests.
- I login as admin in 1st browser (chrome) and delete all session (except one for mydself)
Edit context processor, so i don't access sessions in my project:
show_help = True
Open page in different browser (firefox)
Switch to 1st browser and check if new session object is appear, but nothing has changed - only one session object exist.
Edit 2:
i use django 1.4.1