Hi, I think I have a problem with session in django, maybe it will
sound to any of you like a known issue.

In general, the problem is that sometimes sessions are not saved. It
usually happens if the server was up for more than 24 hours. If I
restart the server the problem resolves.

Code example :

def cookie_test(request):
    if request.GET.has_key('tried'):
        if request.session.test_cookie_worked():
            looger.info('deleting test cookie')
            request.session.delete_test_cookie()
            return show_error(request, 'Cookies are OK!', 'Cookies seem to be
working. You can keep using the website.')
        else:
            looger.info('no test cookie')
            return bipto_render_to_response(request,
'cookie_error.html', {'hide_side':True})
    else:
        logger.info('setting test cookie')
        request.session.set_test_cookie()
        return HttpResponseRedirect(reverse('cookie_test') + '?
tried=1')

this view suppose to be a simple cookie test. show_error and
bipto_render_to_response just create response objects for the user.
After 24 hours, the test cookie is never set even though the client
browser accepts cookies (and sends the correct session id, I checked
with a sniffer).

there is no "delete_test_cookie" anywhere else in my code

ideas anyone?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to