From 378665e6e0ee8595e3c97096331bab365845cd9e Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 16 Aug 2012 17:26:29 +0200 Subject: [PATCH] Adds FB2 link on book text page, bugfixes in annotations dictionary and legacy packager --- apps/catalogue/management/commands/pack.py | 2 +- apps/dictionary/tests.py | 4 +--- apps/dictionary/views.py | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/catalogue/management/commands/pack.py b/apps/catalogue/management/commands/pack.py index 280c0f6ad..6ecf32d59 100755 --- a/apps/catalogue/management/commands/pack.py +++ b/apps/catalogue/management/commands/pack.py @@ -24,7 +24,7 @@ class Command(BaseCommand): help='Exclude specific books by slug') ) help = 'Prepare ZIP package with files of given type.' - args = '[%s] output_path.zip' % '|'.join(ftypes) + args = '[%s] output_path.zip' % '|'.join(Book.formats) def handle(self, ftype, path, **options): self.style = color_style() diff --git a/apps/dictionary/tests.py b/apps/dictionary/tests.py index 0de7c5e6d..27285cc14 100755 --- a/apps/dictionary/tests.py +++ b/apps/dictionary/tests.py @@ -13,13 +13,11 @@ class DictionaryTests(WLTestCase): def setUp(self): WLTestCase.setUp(self) self.book_info = BookInfoStub( - url=u"http://wolnelektury.pl/example/default-book", - about=u"http://wolnelektury.pl/example/URI/default_book", - title=u"Default Book", author=PersonStub(("Jim",), "Lazy"), kind="X-Kind", genre="X-Genre", epoch="X-Epoch", + **info_args(u"Default Book") ) def test_book_with_footnote(self): diff --git a/apps/dictionary/views.py b/apps/dictionary/views.py index a2a814b03..4208d9b4c 100755 --- a/apps/dictionary/views.py +++ b/apps/dictionary/views.py @@ -16,7 +16,7 @@ class NotesView(ListView): objects = objects.filter(sort_key__regex=r"^[0-9]") elif self.letter: objects = objects.filter(sort_key__startswith=self.letter) - return ListView.get_queryset(self) + return objects def get_context_data(self, **kwargs): context = super(NotesView, self).get_context_data(**kwargs) -- 2.20.1