From d48a6a9e3ccf543891146313a2441afc1c0a9d4a Mon Sep 17 00:00:00 2001
From: hardythe1
Date: Wed, 4 Dec 2013 17:44:50 +0530
Subject: removing unwanted files & notifying mail for changes
---
tbc/templates/base1.html | 75 --------------------------------------
tbc/templates/tbc/book-review.html | 3 ++
tbc/views.py | 3 ++
3 files changed, 6 insertions(+), 75 deletions(-)
delete mode 100644 tbc/templates/base1.html
(limited to 'tbc')
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 %}
-
-
-
-
-
-
-
- Scipy India 2013 | IIT Bombay
-
-
-
-
-
-
-
-
-
-
Python Texbook Companion
-
-
- {% if not user %}
-
- {% else %}
-
-
-
-
-
- {% endif %}
-
-
-
-
-
-
- {% block content %}
- {% for book in books %}
-
{{ book.name }}
- {% endfor %}
- {% endblock %}
-
-
-
-
-
-
-
-
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 %}
Book has been approved !
{% endif %}
+{% if mail_notify %}
+Successfully notified the required changes !
+{% endif %}
Books to be reviewed
{% 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
--
cgit