Opened 6 years ago

Closed 6 years ago

#11089 closed (duplicate)

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

Reported by: gregplaysguitar 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: UI/UX:


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 6 years ago by gregplaysguitar

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Version changed from 1.0 to 1.1-beta-1

comment:2 Changed 6 years ago by julien

  • Resolution set to duplicate
  • Status changed from new to closed

#8274 already reports this issue and has a patch

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