Opened 16 years ago

Closed 16 years ago

Last modified 16 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: no UI/UX: no

Description

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 by kenkam <kenkam@…>, 16 years ago

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.

Cheers
Ken

comment:2 by Karen Tracey, 16 years ago

Resolution: invalid
Status: newclosed

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 by italomaia, 16 years ago

Well, i had to hardcode next_page.

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

That's what i meant.

comment:4 by (none), 16 years ago

milestone: post-1.0

Milestone post-1.0 deleted

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