From: Lukasz Anwajler Date: Mon, 22 Nov 2010 20:17:38 +0000 (-0600) Subject: Fixes #925 (xml source link on book's page). X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/84aecebd96f2bc8a27396ecf10c409a8b91e1bcc?hp=-c Fixes #925 (xml source link on book's page). Minor fix: non-standard (mp3, ogg, odt, daisy) media for book are not required anymore in admin. --- 84aecebd96f2bc8a27396ecf10c409a8b91e1bcc diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py index f811461be..98e37c1af 100644 --- a/apps/catalogue/models.py +++ b/apps/catalogue/models.py @@ -208,7 +208,7 @@ class Book(models.Model): epub_file = models.FileField(_('EPUB file'), upload_to=book_upload_path('epub'), blank=True) txt_file = models.FileField(_('TXT file'), upload_to=book_upload_path('txt'), blank=True) # other files - medias = models.ManyToManyField(BookMedia) + medias = models.ManyToManyField(BookMedia, blank=True) parent = models.ForeignKey('self', blank=True, null=True, related_name='children') objects = models.Manager() diff --git a/wolnelektury/templates/catalogue/book_detail.html b/wolnelektury/templates/catalogue/book_detail.html index 676cc0bb6..ffb586b8b 100644 --- a/wolnelektury/templates/catalogue/book_detail.html +++ b/wolnelektury/templates/catalogue/book_detail.html @@ -138,6 +138,9 @@ {{ tag }}{% if not forloop.last %}, {% endif %} {% endfor %} +
  • + {% trans "View XML source" %} +
  • {% trans "Other resources" %}