From 84aecebd96f2bc8a27396ecf10c409a8b91e1bcc Mon Sep 17 00:00:00 2001 From: Lukasz Anwajler Date: Mon, 22 Nov 2010 14:17:38 -0600 Subject: [PATCH 1/1] 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. --- apps/catalogue/models.py | 2 +- wolnelektury/templates/catalogue/book_detail.html | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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" %}