From 3afa66d898abc2a68cb9912c93a86edaee6eef72 Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Tue, 8 Jul 2014 15:35:16 +0530 Subject: removing the changes for now --- tbc/models.py | 1 - tbc/templates/tbc/book-details.html | 2 +- tbc/templates/tbc/upload-content.html | 2 +- tbc/views.py | 2 -- 4 files changed, 2 insertions(+), 5 deletions(-) (limited to 'tbc') diff --git a/tbc/models.py b/tbc/models.py index 56ea268..76c9dc6 100644 --- a/tbc/models.py +++ b/tbc/models.py @@ -101,7 +101,6 @@ class ScreenShots(models.Model): caption = models.CharField(max_length=128) image = models.FileField(upload_to=get_image_dir) book = models.ForeignKey(Book) - chapter = models.ForeignKey(Chapters) def __unicode__(self): name = self.caption or 'ScreenShots' return '%s'%(name) diff --git a/tbc/templates/tbc/book-details.html b/tbc/templates/tbc/book-details.html index 6684244..3099063 100644 --- a/tbc/templates/tbc/book-details.html +++ b/tbc/templates/tbc/book-details.html @@ -19,7 +19,7 @@ function redirectToIpynb(notebook)
Upload screenshots of Plots/Graphs/Charts(if any) "that you have plotted" and not from the textbook itself from any cahpter. If there are no plots/graphs/charts, then upload a screenshot of any chapter. Also give the name of the chapter the screen shot is taken from. The name of the chapter you give should match the name of the chapter given above for its .ipynb file. Only .png files are acceptable.
+Upload screenshots of Plots/Graphs/Charts(if any) "that you have plotted" and not from the textbook itself from any cahpter. If there are no plots/graphs/charts, then upload a screenshot of any chapter. Give proper caption for the screen shots. Only .png files are acceptable.
{% for i in no_images %} diff --git a/tbc/views.py b/tbc/views.py index f45df40..bc3913b 100755 --- a/tbc/views.py +++ b/tbc/views.py @@ -348,8 +348,6 @@ def ContentUpload(request, book_id=None): screenshot = ScreenShots() screenshot.caption = request.POST['caption'+str(i)] screenshot.image = request.FILES['image'+str(i)] - chapter = Chapters.objects.get(name=request.POST['caption'+str(i)], book=curr_book) - screenshot.chapter = chapter screenshot.book = curr_book screenshot.save() book = Book.objects.order_by("-id")[0] -- cgit