logout redirecting to admin-page logout

1,350 views
Skip to first unread message

Mark B.

unread,
Mar 14, 2008, 4:49:23 PM3/14/08
to Django users
Hi all,

I'm having a problem getting the logout redirect stuff working.
Regardless of what I pass as the "next" parameter of the logout URL,
after sending a user to that logout URL he ends up redirected to an
Admin-site looking page, with a title of "Logged out | Django site
admin", and the text "Thanks for spending some quality time with the
web site today." - notably NOT the URL to which I was trying to send
the user.

For example, clicking on:

<a href="/accounts/logout/?next_page=/stuff/list">Logout?</a>

...goes through the following urlpattern:

(r'^accounts/logout/$', logout),

...and then deposits the user at:

http://127.0.0.1:8000/accounts/logout/?next_page=/stuff/list

...which is the aforementioned Django-admin page.

Any ideas as to what I may be doing wrong? I'm running Django 0.96, a
quick google search didn't show anyone else having the same problems
as me so I *must* be doing *something* screwy...

Thanks in advance,

--- Mark ---

Michael

unread,
Mar 14, 2008, 4:59:32 PM3/14/08
to django...@googlegroups.com

Mark B.

unread,
Mar 14, 2008, 5:50:31 PM3/14/08
to Django users
On Mar 14, 4:59 pm, Michael <newmani...@gmail.com> wrote:
> This is what you are looking for:
>
> http://www.djangoproject.com/documentation/settings/#logout-url

Huh, guess I'll hafta try upgrading to one of the SVN versions of
Django. I'd been hoping that 0.96 would work for me, as I tend to be
a bit iffy about in-development versions - especially given that I'd
like to deploy a small Django-powered site at work - and figured that
since the next_page redirection wasn't working as it should according
to the docs and book, I must be doing something wrong. Guess not
though, huh?

Thanks for the quick response, even if it's not the answer I was
hoping for...! =;)

--- Mark ---

Justin Fagnani

unread,
Mar 14, 2008, 6:16:07 PM3/14/08
to django...@googlegroups.com
SVN versions tend to be very stable. If you really don't want to use SVN, you can call django.contrib.logout() in your own view and redirect to wherever. 


-Justin
Reply all
Reply to author
Forward
0 new messages