Ticket #6306: 6306.diff
File 6306.diff, 1.1 KB (added by , 17 years ago) |
---|
-
django/contrib/auth/views.py
8 8 from django.contrib.auth.decorators import login_required 9 9 from django.contrib.auth import REDIRECT_FIELD_NAME 10 10 from django.utils.translation import ugettext as _ 11 from django.utils.http import urlquote 11 12 12 13 def login(request, template_name='registration/login.html', redirect_field_name=REDIRECT_FIELD_NAME): 13 14 "Displays the login form and handles the login action." … … 61 62 if not login_url: 62 63 from django.conf import settings 63 64 login_url = settings.LOGIN_URL 64 return HttpResponseRedirect('%s?%s=%s' % (login_url, redirect_field_name, next))65 return HttpResponseRedirect('%s?%s=%s' % (login_url, urlquote(redirect_field_name), urlquote(next))) 65 66 66 67 def password_reset(request, is_admin_site=False, template_name='registration/password_reset_form.html', 67 68 email_template_name='registration/password_reset_email.html'):