On Fri, May 20, 2011 at 12:56 AM, man_kum <ursa...@gmail.com> wrote: > Hello , > > I am new to Django and trying to handle signin/ signout request > according to following documentation > > http://docs.djangoproject.com/en/1.3/topics/auth/#how-to-log-a-user-in > > > I am using fiddler tool on windows for testing the get/post requests > > > Problem : > when I make a post request with username and password to > http://localhost:8000/signin/ > I am getting a row in mysql django_session table. > > when I make a POST request to http://localhost:8000/signout/ > I am again getting a row in mysql django_session table. where i > suppose it should delete my earlier row in database. >
Your supposition is incorrect. When you log out, your session id is cycled, so that you get a new session id, and hence new session. Django will not remove the old session until it's expiry date is reached _and_ you run the admin command cleanup. All of this is documented: Logout flushes the session: http://docs.djangoproject.com/en/1.3/topics/auth/#django.contrib.auth.logout Flushing session cycles the session key: http://docs.djangoproject.com/en/1.3/topics/http/sessions/#django.contrib.sessions.backends.base.SessionBase.flush Django doesn't auto clean session table http://docs.djangoproject.com/en/1.3/topics/http/sessions/#clearing-the-session-table Cheers Tom -- 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.