diff options
author | hardythe1 | 2013-12-04 17:44:50 +0530 |
---|---|---|
committer | hardythe1 | 2013-12-04 17:44:50 +0530 |
commit | d48a6a9e3ccf543891146313a2441afc1c0a9d4a (patch) | |
tree | 7bcaaa7a733a7a86b917d539cfa04b2df340ee27 /tbc | |
parent | c123451312671e50e47e0309d95fcfc0ffc323d4 (diff) | |
download | Python-TBC-Interface-d48a6a9e3ccf543891146313a2441afc1c0a9d4a.tar.gz Python-TBC-Interface-d48a6a9e3ccf543891146313a2441afc1c0a9d4a.tar.bz2 Python-TBC-Interface-d48a6a9e3ccf543891146313a2441afc1c0a9d4a.zip |
removing unwanted files & notifying mail for changes
Diffstat (limited to 'tbc')
-rw-r--r-- | tbc/templates/base1.html | 75 | ||||
-rw-r--r-- | tbc/templates/tbc/book-review.html | 3 | ||||
-rw-r--r-- | tbc/views.py | 3 |
3 files changed, 6 insertions, 75 deletions
diff --git a/tbc/templates/base1.html b/tbc/templates/base1.html deleted file mode 100644 index de6950c..0000000 --- a/tbc/templates/base1.html +++ /dev/null @@ -1,75 +0,0 @@ -{% load static %} -<!DOCTYPE html> -<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> -<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> - -<head> - <meta charset="utf-8" /> - <meta name="viewport" content="width=device-width" /> - <title>Scipy India 2013 | IIT Bombay</title> - <link rel="stylesheet" href="{% static 'css/base.css' %}" type="text/css" /> - <link rel ="stylesheet" href="{% static 'css/responsive.css' %}" type="text/css"/> -</head> - -<body> -<div class="navbar navbar-inverse navbar-fixed-top"> - <div class="navbar-inner"> - <div class="container"> - <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - <a class="brand" href="/">Python Texbook Companion</a> - <div class="nav-collapse collapse"> - <ul class="nav"> - <li class="active"><a href="#">Home</a></li> - <li><a href="/internshipforms">Internship Forms</a></li> - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">About<b class="caret"></b></a> - <ul class="dropdown-menu"> - <li><a href="/aboutpytbc">Python TBC</a></li> - <li><a href="http://fossee.in" target="_blank">FOSSEE</a></li> - </ul> - </li> - </ul> - {% if not user %} - <form action="" method="post" class="navbar-form pull-right"> - <button type="button" class="btn" onclick='location.replace("{% url 'tbc:UserLogin' %}");'>Login</button> - <button type="button" class="btn" onclick='location.replace("{{URL_ROOT}}/register");'>Sign Up</button> - </form> - {% else %} - <div class="btn-group pull-right"> - <button class="btn">{{ user.first_name }} {{ user.last_name }}</button> - <button class="btn dropdown-toggle" data-toggle="dropdown"> - <span class="caret"></span> - </button> - <ul class="dropdown-menu"> - <li><a href="/submitproposal">Submit Book</a></li> - <li><a href="/logout">Edit Profile</a></li> - <li><a href="#">Python Team</a></li> - <li><a href="/logout">Logout</a></li> - </ul> - </div> - {% endif %} - </div><!--/.nav-collapse --> - </div> - </div> - </div> - <div class="container"> - <div class="hero-unit"> - {% block content %} - {% for book in books %} - <a href="{% url 'tbc:BookDetails' book.id %}">{{ book.name }}</a> - {% endfor %} - {% endblock %} - </div> - <hr> - - <footer> - <p>© FOSSEE - IIT Bombay 2013</p> - </footer> - - </div> <!-- /container --> -</body> -</html> diff --git a/tbc/templates/tbc/book-review.html b/tbc/templates/tbc/book-review.html index 2026fec..774998c 100644 --- a/tbc/templates/tbc/book-review.html +++ b/tbc/templates/tbc/book-review.html @@ -4,6 +4,9 @@ {% if book_review %} <p>Book has been approved !</p> {% endif %} +{% if mail_notify %} +<p>Successfully notified the required changes !</p> +{% endif %} <center><h3>Books to be reviewed</h3></center> <ol> {% for book in books %} diff --git a/tbc/views.py b/tbc/views.py index 1a8469c..dd2e7a4 100644 --- a/tbc/views.py +++ b/tbc/views.py @@ -343,6 +343,8 @@ def BookReview(request, book_id=None): else: if 'book_review' in request.GET: context['book_review'] = True + if 'mail_notify' in request.GET: + context['mail_notify'] = True books = Book.objects.filter(approved=False) context['books'] = books context['reviewer'] = request.user @@ -413,6 +415,7 @@ def NotifyChanges(request, book_id=None): changes_required context.update(csrf(request)) email_send(book.contributor.user.email, subject, message) + return HttpResponseRedirect("/book-review/?mail_notify=done") else: context['book'] = book context['book_id'] = book_id |