I\'m writing a member-based web application, and I need to be able to redirect the page after login. I want to use the named url from my urls.py script in my views.py file f
The right answer from Django 1.3 onwards, where the redirect method implicitly does a reverse call, is:
from django.shortcuts import redirect def login(request): if request.session.get('user'): return redirect('named_url')