Opened 8 years ago
Closed 4 years ago
#28216 closed New feature (fixed)
Add next_page to LoginView
Reported by: | ThinkChaos | Owned by: | ThinkChaos |
---|---|---|---|
Component: | contrib.auth | Version: | 1.11 |
Severity: | Normal | Keywords: | auth, LoginView |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
LogoutView
has a next_page
attribute used to override settings.LOGOUT_REDIRECT_URL
.
It would be nice if LoginView
had the same mechanism.
Change History (11)
comment:2 by , 8 years ago
Yes I have, the issue with that is when redirect_authenticated_user = True
, dispatch
also has redirect logic.
No I don't. It's mostly for symmetry with LogoutView
so that I have redirects in the same view file, and not in the settings.
comment:3 by , 8 years ago
Triage Stage: | Unreviewed → Accepted |
---|
I guess we could see what a patch looks like.
comment:4 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:6 by , 8 years ago
Needs tests: | set |
---|
comment:7 by , 7 years ago
Needs tests: | unset |
---|
I just pushed tests.
Sorry it took so long, I didn't find the tests for LogoutView when I first checked.
comment:8 by , 7 years ago
Has patch: | set |
---|---|
Patch needs improvement: | set |
comment:9 by , 4 years ago
Needs documentation: | set |
---|---|
Patch needs improvement: | unset |
comment:10 by , 4 years ago
Needs documentation: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Did you consider overriding the
get_success_url()
method? Perhaps that method could be documented.Also there is
settings.LOGIN_REDIRECT_URL
. Do you have a use case that requires customizing the redirect for different login views?