benlau / gogogohk

Automatically exported from code.google.com/p/gogogohk
0 stars 0 forks source link

signin/signout #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Click Signin, and Signin
2. Signout
3. Click on the signin button provided by the django interface

What is the expected output? What do you see instead?
Expected output: signin dialog
Seen: 404 error

Original issue reported on code.google.com by sydneyf...@gmail.com on 22 Aug 2009 at 4:44

GoogleCodeExporter commented 9 years ago
2 options in my mind:

(1) set redirect. the default django logout page direct user to /account/ for 
login.
we can use django-redirectmiddleware to forward /account/ request to 
/account/login.
BUT, i don't suggest using this

(2) edit the django logout page template so that the pointer is /account/login 
instead.

Original comment by mr.ksc...@gmail.com on 26 Aug 2009 at 11:15

GoogleCodeExporter commented 9 years ago
clicking either "log in again" or "Home" in django logout page will be 
forwarded to
/account/ and 404 as result

Original comment by mr.ksc...@gmail.com on 26 Aug 2009 at 11:17

GoogleCodeExporter commented 9 years ago
may also try url config with next_page=/ ...

Original comment by mr.ksc...@gmail.com on 26 Aug 2009 at 11:36

GoogleCodeExporter commented 9 years ago
gogogo-hk/settings.py already have the following setting but seems the logout 
then
login again is not affected by the setting

LOGIN_URL = '/account/login/'
LOGOUT_URL = '/account/logout/'
LOGIN_REDIRECT_URL = '/'

Original comment by mr.ksc...@gmail.com on 27 Aug 2009 at 5:28

GoogleCodeExporter commented 9 years ago
one simple solution is to add an entry to urls.py of gogogo-hk

url(r'/account/logout', django.contrib.auth.views.logout, {'next_page':
settings.LOGIN_URL}),

this will redirect to login_url after logout.

Original comment by mr.ksc...@gmail.com on 28 Aug 2009 at 1:13

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
added following entry to the head of url patterns tuple.

url(r'/account/logout', django.contrib.auth.views.logout, {'next_page':
settings.LOGIN_URL}),

Original comment by mr.ksc...@gmail.com on 29 Aug 2009 at 2:32