summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhardythe12013-11-12 11:04:48 +0530
committerhardythe12013-11-12 11:04:48 +0530
commit89e31c3fb3e8e8d0133038ebb4c64eda46f2ba37 (patch)
tree7eb575ad6fb027940b83781598d33b2f05519ade
parent3dc86e30d504f9fa470d050e6921a9daf5dbff53 (diff)
downloadPython-TBC-Interface-89e31c3fb3e8e8d0133038ebb4c64eda46f2ba37.tar.gz
Python-TBC-Interface-89e31c3fb3e8e8d0133038ebb4c64eda46f2ba37.tar.bz2
Python-TBC-Interface-89e31c3fb3e8e8d0133038ebb4c64eda46f2ba37.zip
changing automatic push view to add permissions
-rw-r--r--tbc/templates/tbc/book-review-details.html4
-rw-r--r--tbc/views.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/tbc/templates/tbc/book-review-details.html b/tbc/templates/tbc/book-review-details.html
index 704441f..5ea3f5b 100644
--- a/tbc/templates/tbc/book-review-details.html
+++ b/tbc/templates/tbc/book-review-details.html
@@ -13,7 +13,7 @@
<hr>
<ol>
{% for chapter in chapters %}
- <li><a href="https://www.nbviewer.ipython.org/url/fosseeapps.in{% static 'uploads/' %}{{ chapter.notebook }}">{{ chapter.name }}</a>
+ <li><a href="https://nbviewer.ipython.org/url/dev.fossee.in{% static 'uploads/' %}{{ chapter.notebook }}">{{ chapter.name }}</a>
{% endfor %}
</ol>
<hr>
@@ -28,7 +28,7 @@
</form>
<table>
<tr><td>Author: &nbsp;&nbsp;<td>{{ book.author }}
-<tr><td>Publisher: &nbsp;&nbsp;<td>{{ book.publisher }}
+<tr><td>Publisher: &nbsp;&nbsp;<td>{{ book.publisher_place }}
<tr><td>ISBN: &nbsp;&nbsp;<td>{{ book.isbn }}
<tr><td>Contributor: &nbsp;&nbsp;<td>{{ book.contributor.user.first_name }} {{ book.contributor.user.last_name }}
<tr><td>Email: &nbsp;&nbsp;<td>{{ book.contributor.user.email }}<br>
diff --git a/tbc/views.py b/tbc/views.py
index 1e5d0cf..696b1e8 100644
--- a/tbc/views.py
+++ b/tbc/views.py
@@ -254,7 +254,7 @@ def ApproveBook(request, book_id=None):
file_path = os.path.abspath(os.path.dirname(__file__))
zip_path = "/".join(file_path.split("/")[1:-2])
zip_path = "/"+zip_path+"/Python-Textbook-Companions/"
- file_path = file_path+"/static/uploads/"
+ file_path = file_path+"/uploads/"
directory = file_path+book.contributor.user.first_name
os.chmod(directory, 0777)
os.chdir(directory)