Ticket #377: login.py.diff

File login.py.diff, 869 bytes (added by Adam Endicott <leftwing17@…>, 19 years ago)
  • django/views/auth/login.py

     
    77
    88REDIRECT_FIELD_NAME = 'next'
    99
    10 def login(request):
     10def login(request, template_name='registration/login'):
    1111    "Displays the login form and handles the login action."
    1212    manipulator = AuthenticationForm(request)
    1313    redirect_to = request.REQUEST.get(REDIRECT_FIELD_NAME, '')
     
    2323        errors = {}
    2424    response = HttpResponse()
    2525    request.session.set_test_cookie()
    26     t = template_loader.get_template('registration/login')
     26    t = template_loader.get_template(template_name)
    2727    c = Context(request, {
    2828        'form': formfields.FormWrapper(manipulator, request.POST, errors),
    2929        REDIRECT_FIELD_NAME: redirect_to,
Back to Top