Opened 10 years ago

Closed 10 years ago

#10342 closed (duplicate)

login view should accept a form class

Reported by: steph Owned by: nobody
Component: contrib.auth Version: master
Severity: Keywords: contrib auth login form override
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no


I would like to override the default form (AuthenticationForm) in django.contrib.auth.views.login.
This is needed if an alternative auth backend is used, which needs extra fields for logging in (e.g. captcha).

The attached patch allows to override the form class by adding a "form_class" argument to the view (defaults to AuthenticationForm).

Attachments (1)

r9897-login-form-override.patch (1.7 KB) - added by steph 10 years ago.

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by steph

comment:1 Changed 10 years ago by steph

Component: Contrib appsAuthentication

comment:2 Changed 10 years ago by Jannis Leidel

Needs documentation: set
Needs tests: set
Triage Stage: UnreviewedAccepted

comment:3 Changed 10 years ago by (none)

milestone: post-1.0

Milestone post-1.0 deleted

comment:4 Changed 10 years ago by Julien Phalip

Resolution: duplicate
Status: newclosed

Duplicate of #8274

Note: See TracTickets for help on using tickets.
Back to Top