diff options
-rw-r--r-- | aloha/allotter/views.py | 9 | ||||
-rw-r--r-- | aloha/template/allotter/logout.html | 22 |
2 files changed, 28 insertions, 3 deletions
diff --git a/aloha/allotter/views.py b/aloha/allotter/views.py index a1091f5..de7cd92 100644 --- a/aloha/allotter/views.py +++ b/aloha/allotter/views.py @@ -127,8 +127,11 @@ def apply(request): def user_logout(request): ##Logouts the user. - quit_status = request.POST['check'] - user = request.user + try: + quit_status = request.POST['check'] + user = request.user + except : + return redirect('/allotter/login/') user_profile = user.get_profile() user_application = user_profile.application if str(quit_status) == "on": @@ -137,7 +140,7 @@ def user_logout(request): user_application.quit_status = False user_application.save() logout(request) - return redirect ('/allotter/login/') + return render(request, 'allotter/logout.html') ##http://stackoverflow.com/questions/480214/how-do-you-remove-duplicates-from-a-list-in-python-whilst-preserving-##order def rem_dup(seq): diff --git a/aloha/template/allotter/logout.html b/aloha/template/allotter/logout.html new file mode 100644 index 0000000..4632586 --- /dev/null +++ b/aloha/template/allotter/logout.html @@ -0,0 +1,22 @@ +{% extends "base.html" %} + + +{% block title %}Application sucessfully submitted{% endblock title %} + +{% block content %} +<h2>Your application has been succesfully submitted.</h2> +<hr /> +<h3>You can <a href="/allotter/login/">login</a> again to download the Application Form and the Allotment Form.</h3> +<hr /> +<p><b>For any queries please contact</b> +<br/> +Organizing Chairman, GATE - JAM Office<br/> +Indian Institute of Technology Bombay,<br/> +P.O. IIT Powai, MUMBAI - 400 076<br/> +Phone: 022-25767022, 25767068<br/> +Fax : 022-25722674<br/> +e-mail : jam[at]iitb.ac.in<br/> +Website : www.iitb.ac.in/jam +</p> +{% endblock content %} + |