summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrupti Rajesh Kini2017-07-12 14:42:17 +0530
committerGitHub2017-07-12 14:42:17 +0530
commit41eb5f698d337d96227ae9f0a7ded16cad7b49db (patch)
treefbcc2f0aac6fa06bde6294a110b5be42417a60ae
parent77e49fef8f12735fbafee2fc6b2f77a19021e076 (diff)
parentf508cb92a2129b5a5f65d16ac4f6882186b4240d (diff)
downloadPython-TBC-Interface-41eb5f698d337d96227ae9f0a7ded16cad7b49db.tar.gz
Python-TBC-Interface-41eb5f698d337d96227ae9f0a7ded16cad7b49db.tar.bz2
Python-TBC-Interface-41eb5f698d337d96227ae9f0a7ded16cad7b49db.zip
Merge pull request #52 from FOSSEE/kinitrupti-book-details-8HEADmaster
Update views.py
-rw-r--r--tbc/views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tbc/views.py b/tbc/views.py
index 392e5c8..dfc36b2 100644
--- a/tbc/views.py
+++ b/tbc/views.py
@@ -401,7 +401,7 @@ def edit_book(request, book_id):
else:
return HttpResponseRedirect("/login/?require_login=true")
-def books_fill_details(request):
+def books_fill_details(request, bookfill=None):
user = request.user
if user.is_superuser:
books = Book.objects.all()
@@ -416,7 +416,7 @@ def books_fill_details(request):
else:
books_complete.append(book)
manual.append(book)
- context = {'auto': auto, 'manual': manual, 'books_complete': books_complete}
+ context = {'auto': auto, 'manual': manual, 'books_complete': books_complete, 'bookfill': bookfill}
return render_to_response('tbc/books-fill-details.html', context)
else:
return HttpResponseRedirect("/login/?require_login=true")
@@ -431,7 +431,7 @@ def edit_books_fill_details(request, book_id):
form = BookForm(request.POST, instance=book)
if form.is_valid():
form.save()
- return books_fill_details(request)
+ return books_fill_details(request, True)
else:
form.fields['title'].widget.attrs['readonly'] = True
form.fields['author'].widget.attrs['readonly'] = True