diff options
author | hardythe1 | 2015-07-07 17:03:29 +0530 |
---|---|---|
committer | hardythe1 | 2015-07-07 17:03:29 +0530 |
commit | 58fff94bc6025629e4d5bebd5b89090b94bfe9eb (patch) | |
tree | 8eb7bec0c90e55e13763d82dc798a93a64dcd32d | |
parent | 4fabeb0b92daae2bc2c93069cf14ba1703cbe3c9 (diff) | |
download | SciPy2015-58fff94bc6025629e4d5bebd5b89090b94bfe9eb.tar.gz SciPy2015-58fff94bc6025629e4d5bebd5b89090b94bfe9eb.tar.bz2 SciPy2015-58fff94bc6025629e4d5bebd5b89090b94bfe9eb.zip |
on logout redirect to cfp
-rw-r--r-- | website/templates/cfp.html | 2 | ||||
-rw-r--r-- | website/urls.py | 1 | ||||
-rw-r--r-- | website/views.py | 9 |
3 files changed, 11 insertions, 1 deletions
diff --git a/website/templates/cfp.html b/website/templates/cfp.html index c584cc5..cea8f56 100644 --- a/website/templates/cfp.html +++ b/website/templates/cfp.html @@ -17,7 +17,7 @@ <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ user.get_full_name|default:user.username }}<b class="caret"></b></a> <ul class="dropdown-menu"> - <li><a href="{% url 'auth:logout' %}?next={{ request.path }}">Logout</a></li> + <li><a href="{% url 'website:userlogout' %}">Logout</a></li> </ul> {% endif %} </ul> diff --git a/website/urls.py b/website/urls.py index d3e2508..05266c1 100644 --- a/website/urls.py +++ b/website/urls.py @@ -5,4 +5,5 @@ urlpatterns = patterns('', url(r'^$', 'website.views.home', name='home'), url(r'^cfp$', 'website.views.cfp', name='cfp'), url(r'^submit-cfp$', 'website.views.submitcfp', name='submitcfp'), + url(r'^logout$', 'website.views.userlogout', name='userlogout'), ) diff --git a/website/views.py b/website/views.py index c793c09..dfec67c 100644 --- a/website/views.py +++ b/website/views.py @@ -40,6 +40,15 @@ def cfp(request): 'user': request.user}) return render_to_response('cfp.html', context_instance=context) + + +def userlogout(request): + user = request.user + if user.is_authenticated: + logout(request) + return HttpResponseRedirect("/cfp") + else: + return HttpResponseRedirect("/cfp") def submitcfp(request): |