I've a big problem with user authentification, my application get an username and a hashkey to verify if the user is logged in. I wrote a function that check this, it worked fine to log in the user with:
user.backend = 'django.contrib.auth.backends.ModelBackend' login( request, user ) Login works, clicking around works, but doing nothing a few seconds and than click on a menu entry logs me out and redirects to the login screen. debug_toolbar shows me this sql queries (all made by request.user.is_authenticated): SELECT `django_session`.`session_key`, `django_session`.`session_data`, `django_session`.`expire_date` FROM `django_session` WHERE (`django_session`.`session_key` = 000000008373a54580503b02238a3f45 AND `django_session`.`expire_date` > 2009-08-20 17:59:44 ) SELECT `django_session`.`session_key`, `django_session`.`session_data`, `django_session`.`expire_date` FROM `django_session` WHERE `django_session`.`session_key` = 00000000a2aabd791f8e593d9dbf7e21 INSERT INTO `django_session` (`session_key`, `session_data`, `expire_date`) VALUES (00000000a2aabd791f8e593d9dbf7e21, gAJ9cQEuMDAwMDAwMDA0OGU1MTExNWYxNzY3YjcyZjc2MmFkZGI= , 2009-08-20 18:59:45) I check the database and the first session expire_date is in the future, so the session is active, but why did Django flushes the old session and creating a new one? greets, florian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---