summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tbc/templates/tbc/upload-content.html2
-rw-r--r--tbc/views.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/tbc/templates/tbc/upload-content.html b/tbc/templates/tbc/upload-content.html
index a0d2369..3fb5eca 100644
--- a/tbc/templates/tbc/upload-content.html
+++ b/tbc/templates/tbc/upload-content.html
@@ -2,7 +2,7 @@
{% block content %}
<div id="content-wrap" style="max-width:600px;">
<p>Upload chapters as individual IPython notebooks </p>
- <form action="/upload-content/" method=POST enctype="multipart/form-data">
+ <form action="/upload-content/{{ curr_book.id }}" method=POST enctype="multipart/form-data">
{% csrf_token %}
{% for i in no_notebooks %}
<input type=text name=chapter{{i}} placeholder="Chapter {{ forloop.counter }} name">
diff --git a/tbc/views.py b/tbc/views.py
index 0660d04..bc35c18 100644
--- a/tbc/views.py
+++ b/tbc/views.py
@@ -278,6 +278,7 @@ def ContentUpload(request, book_id=None):
context = {}
context.update(csrf(request))
context['user'] = user
+ context['curr_book'] = curr_book
context['no_notebooks'] = [i for i in range(1, curr_book.no_chapters+1)]
context['no_images'] = [i for i in range(1, 4)]
return render_to_response('tbc/upload-content.html', context)