Merge pull request #466 from Gluejar/fix_ebook_add

Fix ebook add
pull/1/head
Raymond Yee 2015-03-10 12:39:38 -07:00
commit 99350d6cc4
2 changed files with 3 additions and 3 deletions

View File

@ -214,7 +214,7 @@ class EbookFileForm(forms.ModelForm):
class EbookForm(forms.ModelForm):
class Meta:
model = Ebook
exclude =( 'created', 'download_count', 'active')
exclude =( 'created', 'download_count', 'active', 'filesize')
widgets = {
'edition': forms.HiddenInput,
'user': forms.HiddenInput,

View File

@ -2,10 +2,10 @@
{% if edition.ebook_form %}
{% if show_ebook_form %}
<div id="add_ebook">
{% if alert %}<div class="yikes">{{alert}}</div>{% endif %}
{% if edition.ebooks.all.0 %}
<h2>eBooks for this Edition</h2>
{% if alert %}<div class="yikes">{{alert}}</div>{% endif %}
{% for ebook in edition.ebooks.all %}
<a href="{% url download_ebook ebook.id %}">{{ ebook.format }}</a> {{ebook.rights}} at {{ebook.provider}}. Downloaded {{ ebook.download_count }} times.<br />
{% endfor %}