Commit 50d25b1e authored by Luuk Scholten's avatar Luuk Scholten
Browse files

Fix member uploads of summaries

Was not possible to upload summaries at all
parent 03fbe161
......@@ -13,7 +13,7 @@
</div>
{% endif %}
<form method="post" class="form-horizontal span8 offset2">
<form method="post" enctype="multipart/form-data" class="form-horizontal span8 offset2">
{% csrf_token %}
{% for field in form %}
......@@ -36,4 +36,4 @@
<input type="submit" value="{% trans 'submit'|capfirst %}" class="btn btn-style1 pull-right login" />
</form>
{% endblock %}
\ No newline at end of file
{% endblock %}
......@@ -97,12 +97,13 @@ def submit_summary(request, id=None):
saved = False
if request.POST:
form = AddSummaryForm(request.POST)
form = AddSummaryForm(request.POST, request.FILES)
if form.is_valid():
saved = True
obj = form.save(commit=False)
obj.uploader = request.user
obj.uploader_date = datetime.now()
obj.save()
obj = Summary()
obj.year = datetime.now().year
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment