summaryrefslogtreecommitdiff
path: root/scipy/views.py
diff options
context:
space:
mode:
authorJayaram Pai2013-10-15 13:59:06 +0530
committerJayaram Pai2013-10-15 13:59:06 +0530
commitf422686e69b5f98ff7a3db12787aa7bed6849023 (patch)
treeb434203bd46af5392abc79589e8dbd1b5f6f8236 /scipy/views.py
parent0241bbd60f416342c8d7a5ff41bc06dedb1148ff (diff)
downloadSciPy2013-f422686e69b5f98ff7a3db12787aa7bed6849023.tar.gz
SciPy2013-f422686e69b5f98ff7a3db12787aa7bed6849023.tar.bz2
SciPy2013-f422686e69b5f98ff7a3db12787aa7bed6849023.zip
displaying logged in user.
logout link and redirect.
Diffstat (limited to 'scipy/views.py')
-rw-r--r--scipy/views.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scipy/views.py b/scipy/views.py
index 7a9cce1..25932ff 100644
--- a/scipy/views.py
+++ b/scipy/views.py
@@ -45,7 +45,7 @@ def user_login(request):
# User Logout View
def user_logout(request):
logout(request)
- return HttpResponseRedirect('/2013')
+ return HttpResponseRedirect('/')
# User Register View
def user_register(request):
@@ -89,6 +89,7 @@ def upload_document(request):
context = {}
context.update(csrf(request))
context['form'] = form
+ context['current_user'] = request.user
return render_to_response('upload-document.html', context)
else:
form = DocumentUploadForm()
@@ -96,6 +97,7 @@ def upload_document(request):
context = {}
context.update(csrf(request))
context['form'] = DocumentUploadForm()
+ context['current_user'] = request.user
return render_to_response('upload-document.html', context)
else:
return HttpResponseRedirect('/2013/accounts/login')