From 274de65ca44c680c6c555c599ec32428c79db356 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 4 Jan 2016 15:38:01 +0100 Subject: [PATCH] fix --- fabfile.py | 11 +++++++++-- requirements/requirements-dev.txt | 1 + src/catalogue/tests/tags.py | 9 --------- src/catalogue/tests/visit.py | 1 - src/catalogue/urls.py | 1 - src/catalogue/views.py | 5 ----- 6 files changed, 10 insertions(+), 18 deletions(-) diff --git a/fabfile.py b/fabfile.py index e614e9ce5..bdf0fad40 100644 --- a/fabfile.py +++ b/fabfile.py @@ -1,4 +1,4 @@ -from fnpdjango.deploy import * +from fnpdeploy import * try: from fabfile_local import * except ImportError: @@ -13,6 +13,8 @@ def production(): env.hosts = ['giewont.icm.edu.pl'] env.user = 'lektury' env.app_path = '/srv/wolnelektury.pl' + env.django_root_path = 'src' + env.requirements_file = 'requirements/requirements.txt' env.services = [ Supervisord('wolnelektury'), Supervisord('wolnelektury.celery'), @@ -24,7 +26,12 @@ def beta(): env.hosts = ['giewont.icm.edu.pl'] env.user = 'lektury' env.app_path = '/srv/wolnelektury.pl/beta' - env.services = [] + env.ve = '/srv/wolnelektury.pl/ve' + env.django_root_path = 'src' + env.requirements_file = 'requirements/requirements.txt' + env.services = [ + Supervisord('beta'), + ] @task diff --git a/requirements/requirements-dev.txt b/requirements/requirements-dev.txt index 9c428052c..51e044bd0 100644 --- a/requirements/requirements-dev.txt +++ b/requirements/requirements-dev.txt @@ -6,3 +6,4 @@ BabelDjango Fabric sphinx pyinotify +fnpdeploy diff --git a/src/catalogue/tests/tags.py b/src/catalogue/tests/tags.py index 42ea6e245..527775bb8 100644 --- a/src/catalogue/tests/tags.py +++ b/src/catalogue/tests/tags.py @@ -286,12 +286,3 @@ class BookTagsTests(WLTestCase): ['kind']) self.assertEqual([(tag.name, tag.count) for tag in related_themes], [('ChildTheme', 1), ('ParentTheme', 1), ('Theme', 2)]) - - def test_catalogue_tags(self): - """ test main page tags and counts """ - context = self.client.get('/katalog/').context - self.assertEqual([(tag.name, tag.count) for tag in context['categories']['author']], - [('Jim Lazy', 1), ('Common Man', 1)]) - self.assertEqual([(tag.name, tag.count) for tag in context['categories']['theme']], - [('ChildTheme', 1), ('ParentTheme', 1), ('Theme', 2)]) - diff --git a/src/catalogue/tests/visit.py b/src/catalogue/tests/visit.py index cab3c987d..8cfea1290 100644 --- a/src/catalogue/tests/visit.py +++ b/src/catalogue/tests/visit.py @@ -45,7 +45,6 @@ class VisitTest(WLTestCase): 'autor/jane-doe/', 'autor/jane-doe/gatunek/genre/', 'autor/jane-doe/gatunek/genre/motyw/theme/', - 'pl.json', 'b/%d/mini.pl.html' % self.book.pk, 'b/%d/mini_nolink.pl.html' % self.book.pk, 'b/%d/short.pl.html' % self.book.pk, diff --git a/src/catalogue/urls.py b/src/catalogue/urls.py index 35a08e11d..0b33ce96c 100644 --- a/src/catalogue/urls.py +++ b/src/catalogue/urls.py @@ -77,7 +77,6 @@ urlpatterns += patterns('catalogue.views', 'book_fragments', name='book_fragments'), # Includes. - url(r'^(?P[^/]+)\.json$', 'catalogue_json'), url(r'^b/(?P\d+)/mini\.(?P.+)\.html', 'book_mini', name='catalogue_book_mini'), url(r'^b/(?P\d+)/mini_nolink\.(?P.+)\.html', 'book_mini', {'with_link': False}, name='catalogue_book_mini_nolink'), url(r'^b/(?P\d+)/short\.(?P.+)\.html', 'book_short', name='catalogue_book_short'), diff --git a/src/catalogue/views.py b/src/catalogue/views.py index 5a8277f88..a6d6e0023 100644 --- a/src/catalogue/views.py +++ b/src/catalogue/views.py @@ -42,11 +42,6 @@ def catalogue(request, as_json=False): return render(request, 'catalogue/catalogue.html', locals()) -@ssi_included -def catalogue_json(request): - return catalogue(request, True) - - def book_list(request, filter=None, get_filter=None, template_name='catalogue/book_list.html', nav_template_name='catalogue/snippets/book_list_nav.html', -- 2.20.1