#28779: PasswordChangeView and PasswordChangeDoneView do not use a custom
REDIRECT_FIELD_NAME
-------------------------------------+-------------------------------------
Reporter: Meiyer | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: contrib.auth | Version: 1.11
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Meiyer):
Currently, in order to make Django work as expected with a customized
`REDIRECT_FIELD_NAME`, one has to:
1. subclass `LoginView` (or provide a value in `urls.py` via
`LoginView.as_view()`)
2. subclass `LogoutView` (or provide a value in `urls.py` via
`LogoutView.as_view()`)
3. subclass `LoginRequiredMixin`
4. subclass `PermissionRequiredMixin`
5. subclass `UserPassesTestMixin`
6. subclass any class that uses the `login_required` decorator, that is,
`PasswordChangeView`, `PasswordChangeDoneView`
* if a custom class uses the decorator, one has to remember to modify
it as well
7. subclass any class that uses the `user_passes_test` decorator
(currently only in Admin)
* if a custom class uses the decorator, one has to remember to modify
it as well
8. build own special treatment of redirection for flat pages that require
registration (no subclassing is possible)
This does not make sense.
--
Ticket URL: <https://code.djangoproject.com/ticket/28779#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.8cceb6536d26ebfd2249afbe57492571%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.