Opened 17 years ago

Last modified 14 years ago

#6581 closed

django.contrib.auth.views.redirect_to_login isn't a view — at Initial Version

Reported by: steve_cassidy51 Owned by: nobody
Component: contrib.auth Version: dev
Severity: Normal Keywords: auth redirect_to_login
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

The documentation lists redirect_to_login as a view alongside password_change etc but the definition doesn't take a 'request' first argument and so doesn't work properly as a view. Eg. if I use it in urls.py:

(r'$', 'django.contrib.auth.views.redirect_to_login', {'next': '/something'})...

then I get an error that 'next' is provided twice since the first arg supplied to the view
is the request object. If I leave out 'next' then I get a huge long URL in the redirect that contains the entire request serialised.

So, either this should be made into a view with the addition of the request parameter or it should be removed from the list of views in the documentation.

Change History (0)

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