Django

Code

Ticket #11389 (closed: duplicate)

Opened 8 months ago

Last modified 6 months ago

contrib.auth.login should allow to replace AuthenticationForm

Reported by: anonymous Assigned to: nobody
Milestone: Component: Authentication
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

Hello,

I'm using django for quite some time. For the first time I needed a custom login (other fields besides login and password) and also a custom auth backend.

I had to do a custom login with is basically a copy of contrib.auth.views.login with AuthenticationForm? replaced by my own form.

The definition of contrib.auth.views.login should be: def login(request, template_name='registration/login.html', redirect_field_name=REDIRECT_FIELD_NAME, authentication_form=AuthenticationForm?):

so we could just define on urls.py with form class we would like to use.

Attachments

Change History

08/08/09 15:26:24 changed by Alex

  • status changed from new to closed.
  • needs_better_patch changed.
  • resolution set to duplicate.
  • needs_tests changed.
  • needs_docs changed.

This ticket is a dulicate.


Add/Change #11389 (contrib.auth.login should allow to replace AuthenticationForm)




Change Properties
Action