Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#9217 closed (invalid)

Logout should accept a next parameter

Reported by: italomaia Owned by: nobody
Component: Uncategorized Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Well, as auth's login accepts a 'next' parameter, logout should accept next as well. If i want to redirect an user to something other then a template, i have to create a template page that does just that. This ain't cool!

Change History (4)

comment:1 Changed 8 years ago by kenkam <kenkam@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

You can pass a next_page argument to the logout view in django.contrib.auth.views

url(r'^logout/$', logout, {'next_page':'/path/to/redirect'}, name='logout'), 

This will mean all users going to the logout view will go to that next_page. I think Django is correct here, there's no need for extra granular control for many use cases.


comment:2 Changed 8 years ago by kmtracey

  • Resolution set to invalid
  • Status changed from new to closed

So it sounds like the requested feature already exists, in which case there is no need for this to stay open? If the existing next_page parameter doesn't do what's being asked for here, please clarify what it is exactly that you are looking for.

comment:3 Changed 8 years ago by italomaia

Well, i had to hardcode next_page.

/path/to/redirect <= bad
reverse('codename_to_path') <= good

That's what i meant.

comment:4 Changed 8 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

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