I suspect you have a clash in names here. You have two methods named "login":
5: from django.contrib.auth import authenticate, login 9: def login(request, template_name='auth/login.html'): So when you call login(request, user) on line 21, it's calling the method you created on line 9, not the login method you import on line 5. And that means the user isn't actually being logged in. To fix this, simple import login as auth_login, then change line 21 to auth_login(request, user) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.