Ticket #377: login.py.diff
File login.py.diff, 869 bytes (added by , 19 years ago) |
---|
-
django/views/auth/login.py
7 7 8 8 REDIRECT_FIELD_NAME = 'next' 9 9 10 def login(request ):10 def login(request, template_name='registration/login'): 11 11 "Displays the login form and handles the login action." 12 12 manipulator = AuthenticationForm(request) 13 13 redirect_to = request.REQUEST.get(REDIRECT_FIELD_NAME, '') … … 23 23 errors = {} 24 24 response = HttpResponse() 25 25 request.session.set_test_cookie() 26 t = template_loader.get_template( 'registration/login')26 t = template_loader.get_template(template_name) 27 27 c = Context(request, { 28 28 'form': formfields.FormWrapper(manipulator, request.POST, errors), 29 29 REDIRECT_FIELD_NAME: redirect_to,