Allow custom AuthenticationForm in django.contrib.auth login view.
|Reported by:||chronos||Owned by:||nobody|
|Severity:||Keywords:||login, forms, authentication, customization, custom|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The idea is: allow develop to set a custom authentication form in login view without change much code.
Support of custom forms is usefull if developer use a custom form class, if plan to make more things in authentication that default form does (if for some motive he not want to write your own view) and, after all, form is better place to validate trought e-mail instead username (a common request I think).
This patch allow develop to send own authentication form to login view in urls.py and do what he wants in form.
I attach patch, a urls.py snippet and a form that I used to show example. My form use <a href="https://launchpad.net/django-form-utils">django-form-utils</a> in case to allow more customizable forms.
Change History (6)
comment:1 Changed 6 years ago by Alex
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Resolution set to duplicate
- Status changed from new to closed