Opened 16 years ago

Closed 16 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

Description

I've been using http://www.djangosnippets.org/snippets/74/ 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 by Greg Brown, 16 years ago

Version: 1.01.1-beta-1

comment:2 by Julien Phalip, 16 years ago

Resolution: duplicate
Status: newclosed

#8274 already reports this issue and has a patch

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