summaryrefslogtreecommitdiff
path: root/tbc/templates/tbc/update-code.html
diff options
context:
space:
mode:
Diffstat (limited to 'tbc/templates/tbc/update-code.html')
-rw-r--r--tbc/templates/tbc/update-code.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/tbc/templates/tbc/update-code.html b/tbc/templates/tbc/update-code.html
index 536617b..ec1bbc0 100644
--- a/tbc/templates/tbc/update-code.html
+++ b/tbc/templates/tbc/update-code.html
@@ -1,4 +1,5 @@
{% extends 'base.html' %}
+{% load tags %}
{% block script %}
<script src="/static/js/jquery.js" type="text/javascript"></script>
<script>
@@ -57,9 +58,9 @@ function validate_content()
<p>Upload the corrected IPython Notebooks & screen shots.</p>
<form action="/submit-code/" method=POST enctype="multipart/form-data">
{% csrf_token %}
- {% for chapter in chapters %}
- <input class="chapters" type=text id=chapter{{forloop.counter}} name=chapter{{forloop.counter}} value="{{ chapter.name }}">
- <input type=file name=notebook{{forloop.counter}} id=notebook{{forloop.counter}}>
+ {% for i in no_notebooks %}
+ <input class="chapters" type=text id=chapter{{i}} name=chapter{{i}} value="{{ chapters|lookup:i }}">
+ <input type=file name=notebook{{i}} id=notebook{{i}}>
{% endfor %}
<br>
<hr>