Opened 21 months ago

Last modified 17 months ago

#28216 assigned New feature

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: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no


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 (8)

comment:1 Changed 21 months ago by Tim Graham

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?

Last edited 21 months ago by Tim Graham (previous) (diff)

comment:2 Changed 21 months ago by ThinkChaos

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 Changed 20 months ago by Tim Graham

Triage Stage: UnreviewedAccepted

I guess we could see what a patch looks like.

comment:4 Changed 20 months ago by ThinkChaos

Owner: changed from nobody to ThinkChaos
Status: newassigned

comment:5 Changed 20 months ago by ThinkChaos

comment:6 Changed 20 months ago by Mads Jensen

Needs tests: set

comment:7 Changed 18 months ago by ThinkChaos

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 Changed 17 months ago by Tim Graham

Has patch: set
Patch needs improvement: set
Note: See TracTickets for help on using tickets.
Back to Top