contact view: html templates separated for diff portals
[unfold.git] / localauth / views.py
1 from django.contrib.auth import logout
2 from django.http import HttpResponseRedirect
3
4 from myslice.settings import logger
5
6 import activity.user
7
8 # hard question : where should we redirect requests to logout if user is not logged in ?
9 def logout_user (request):
10     # check that we're indeed logged in
11     if not request.user.is_authenticated():
12         return HttpResponseRedirect ('/')
13     logger.info("LOGGING OUT")
14     
15     # log user activity
16     activity.user.logout(request)
17     
18     logout(request)
19     return HttpResponseRedirect ('/')
20         
21