Opened 10 years ago

Closed 10 years ago

#11089 closed (duplicate)

contrib.auth.views.login should take an optional 'form' argument

Reported by: Greg Brown Owned by: nobody
Component: Contrib apps Version: 1.1-beta
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I've been using to allow users to log in with their email address, and it has been working really nicely except that users with an email address over 30 characters can't log in. The fix is simply to increase the max_length attribute on the login form's username field, however to effect this change I needed to write a custom view, which was a duplicate of contrib.auth.views.login except that it used my custom form.

My proposal is to add an optional 'form' argument to contrib.auth.views.login - that way I could just put

    (r'^accounts/login/$', auth_views.login, {'form': MyAuthenticationForm}),

in my url conf.

Change History (2)

comment:1 Changed 10 years ago by Greg Brown

Version: 1.01.1-beta-1

comment:2 Changed 10 years ago by Julien Phalip

Resolution: duplicate
Status: newclosed

#8274 already reports this issue and has a patch

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