Ticket #15198: authform_clean__no_request.diff

File authform_clean__no_request.diff, 557 bytes (added by Ciantic, 4 years ago)

AuthenticationForm is called without request

  • django/contrib/auth/views.py

    diff --git a/django/contrib/auth/views.py b/django/contrib/auth/views.py
    index 8d0453f..efadc5d 100644
    a b def login(request, template_name='registration/login.html', 
    3030    redirect_to = request.REQUEST.get(redirect_field_name, '')
    3131
    3232    if request.method == "POST":
    33         form = authentication_form(data=request.POST)
     33        form = authentication_form(request, data=request.POST)
    3434        if form.is_valid():
    3535            netloc = urlparse.urlparse(redirect_to)[1]
    3636
Back to Top