From 06e460b91c23f11e92bf5ae711a4ed2226d3a0c7 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 7 Mar 2019 18:42:38 +0100 Subject: [PATCH 1/1] Housekeeping: removed celery dependency and some unused code. --- AUTHORS.md | 9 +- README.md | 25 +-- redakcja-celery.conf | 22 --- requirements/requirements.txt | 3 - src/catalogue/helpers.py | 1 - .../commands/assign_from_redmine.py | 151 ------------------ .../migrations/0002_auto_20190307_1543.py | 27 ++++ .../migrations/0003_chunk__new_publishable.py | 20 +++ src/catalogue/models/book.py | 19 +-- src/catalogue/models/chunk.py | 20 +-- src/catalogue/models/image.py | 22 --- src/catalogue/models/listeners.py | 13 -- src/catalogue/tasks.py | 25 --- .../templates/catalogue/book_detail.html | 2 +- .../templates/catalogue/book_list/book.html | 2 +- .../catalogue/book_list/book_list.html | 11 +- .../templates/catalogue/image_table.html | 4 +- src/catalogue/templatetags/book_list.py | 4 +- src/catalogue/tests/test_gallery.py | 5 - src/redakcja/__init__.py | 5 - src/redakcja/celery.py | 23 --- src/redakcja/localsettings.sample | 2 - src/redakcja/settings/__init__.py | 5 - src/redakcja/settings/test.py | 1 - .../templates/wiki_img/document_details.html | 4 +- .../templates/wiki_img/tabs/summary_view.html | 24 --- .../wiki_img/tabs/summary_view_item.html | 5 - 27 files changed, 78 insertions(+), 376 deletions(-) delete mode 100644 redakcja-celery.conf delete mode 100644 src/catalogue/management/commands/assign_from_redmine.py create mode 100644 src/catalogue/migrations/0002_auto_20190307_1543.py create mode 100644 src/catalogue/migrations/0003_chunk__new_publishable.py delete mode 100644 src/catalogue/tasks.py delete mode 100644 src/redakcja/celery.py delete mode 100644 src/wiki_img/templates/wiki_img/tabs/summary_view.html delete mode 100644 src/wiki_img/templates/wiki_img/tabs/summary_view_item.html diff --git a/AUTHORS.md b/AUTHORS.md index b48559cd..a0e5812c 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -1,5 +1,10 @@ Authors ------- -* Łukasz Rekucki -* Marek Stępniowski +* Łukasz Rekucki +* Marek Stępniowski +* Radek Czajka +* Łukasz Anwajler +* Marcin Koziej +* Aleksander Łukasz +* Jan Szejko diff --git a/README.md b/README.md index f1672f4f..0c05ea6c 100644 --- a/README.md +++ b/README.md @@ -12,37 +12,26 @@ Instalacja i użycie #. Przejdź do katalogu serwisu w konsoli #. Zainstaluj wymagane biblioteki komendą:: - pip install -r requirements.txt + pip install -r requirements/requirements.txt -#. Wypełnij bazę danych (Django poprosi o utworzenie pierwszego użytkownika):: +#. Wypełnij bazę danych:: - ./project/manage.py syncdb + src/manage.py migrate -#. Skopiuj zawartość pliku `project/localsettings.sample` do `project/localsettings.py` i zmień go zgodnie ze swoimi potrzebami. +#. Skopiuj zawartość pliku `src/redakcja/localsettings.sample` do `src/redakcja/localsettings.py` i zmień go zgodnie ze swoimi potrzebami. #. Uruchom serwer deweloperski:: - ./project/manage.py runserver + src/manage.py runserver -#. Zalecane jest serwowanie aplikacji przez `modwsgi `_ na serwerze `Apache2 `_ przy pomocy załączonego skryptu `dispatch.fcgi`. Inne strategie wdrożeniowe opisane są w `Dokumentacji Django `_. +#. Strategie wdrożeniowe opisane są w `Dokumentacji Django `_. -Wdrożenie -========= -#. Ściągnij i zainstaluj `fabric `_ -#. Przejdź do katalogu serwisu w konsoli -#. Aby wdrożyć serwis na serwer deweloperski wpisz komendę:: - - fab staging deploy - - Aby wdrożyć serwis na serwer produkcyjny wpisz:: - - fab production deploy Testy ==== $ pip install -r requirements-test.txt - $ python src/manage.py test --settings=redakcja.settings.test + $ make test JavaScript (wymagany node.js i xsltproc): diff --git a/redakcja-celery.conf b/redakcja-celery.conf deleted file mode 100644 index 9168db84..00000000 --- a/redakcja-celery.conf +++ /dev/null @@ -1,22 +0,0 @@ -; ======================================= -; celeryd supervisor example for Django -; ======================================= - -[program:celery] -command=$APP_DIR/redakcja/manage.py celeryd --loglevel=INFO -directory=$APP_DIR/redakcja -user=nobody -numprocs=2 -stdout_logfile=$APP_DIR/log/celeryd.log -stderr_logfile=$APP_DIR/log/celeryd.log -autostart=true -autorestart=true -startsecs=10 - -; Need to wait for currently executing tasks to finish at shutdown. -; Increase this if you have very long running tasks. -stopwaitsecs = 600 - -; if rabbitmq is supervised, set its priority higher -; so it starts first -priority=998 diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 2781a336..ea54455c 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -21,7 +21,4 @@ django-gravatar2 python-slugify django-extensions==1.5.7 -celery>=3.1.12,<3.2 -kombu>=3.0,<3.1 - raven diff --git a/src/catalogue/helpers.py b/src/catalogue/helpers.py index d340b461..7c28188d 100644 --- a/src/catalogue/helpers.py +++ b/src/catalogue/helpers.py @@ -87,7 +87,6 @@ class GalleryMerger(object): self.src_size = len(files_other) if files and files_other: - print "compare %s with %s" % (files[-1], files_other[0]) if filecmp.cmp( join(self.path(self.dest), files[-1]), join(self.path(self.src), files_other[0]), diff --git a/src/catalogue/management/commands/assign_from_redmine.py b/src/catalogue/management/commands/assign_from_redmine.py deleted file mode 100644 index 491fd832..00000000 --- a/src/catalogue/management/commands/assign_from_redmine.py +++ /dev/null @@ -1,151 +0,0 @@ -# -*- coding: utf-8 -*- - -import csv -from optparse import make_option -import re -import sys -import urllib -import urllib2 - -from django.contrib.auth.models import User -from django.core.management.base import BaseCommand -from django.core.management.color import color_style -from django.db import transaction - -from slugify import slugify -from catalogue.models import Chunk - - -REDMINE_CSV = 'http://redmine.nowoczesnapolska.org.pl/projects/wl-publikacje/issues.csv' -REDAKCJA_URL = 'http://redakcja.wolnelektury.pl/documents/' - - -class Command(BaseCommand): - option_list = BaseCommand.option_list + ( - make_option('-r', '--redakcja', dest='redakcja', metavar='URL', - help='Base URL of Redakcja documents', - default=REDAKCJA_URL), - make_option('-q', '--quiet', action='store_false', dest='verbose', default=True, - help='Less output'), - make_option('-f', '--force', action='store_true', dest='force', default=False, - help='Force assignment overwrite'), - ) - help = 'Imports ticket assignments from Redmine.' - args = '[redmine-csv-url]' - - def handle(self, *redmine_csv, **options): - - self.style = color_style() - - redakcja = options.get('redakcja') - verbose = options.get('verbose') - force = options.get('force') - - if not redmine_csv: - if verbose: - print "Using default Redmine CSV URL:", REDMINE_CSV - redmine_csv = REDMINE_CSV - - # Start transaction management. - transaction.enter_transaction_management() - - redakcja_link = re.compile(re.escape(redakcja) + r'([-_.:?&%/a-zA-Z0-9]*)') - - all_tickets = 0 - all_chunks = 0 - done_tickets = 0 - done_chunks = 0 - empty_users = 0 - unknown_users = {} - unknown_books = [] - forced = [] - - if verbose: - print 'Downloading CSV file' - for r in csv.reader(urllib2.urlopen(redmine_csv)): - if r[0] == '#': - continue - all_tickets += 1 - - username = r[6] - if not username: - if verbose: - print "Empty user, skipping" - empty_users += 1 - continue - - first_name, last_name = unicode(username, 'utf-8').rsplit(u' ', 1) - try: - user = User.objects.get(first_name=first_name, last_name=last_name) - except User.DoesNotExist: - print self.style.ERROR('Unknown user: ' + username) - unknown_users.setdefault(username, 0) - unknown_users[username] += 1 - continue - - ticket_done = False - for fname in redakcja_link.findall(r[-1]): - fname = unicode(urllib.unquote(fname), 'utf-8', 'ignore') - if fname.endswith('.xml'): - fname = fname[:-4] - fname = fname.replace(' ', '_') - fname = slugify(fname) - - chunks = Chunk.objects.filter(book__slug=fname) - if not chunks: - print self.style.ERROR('Unknown book: ' + fname) - unknown_books.append(fname) - continue - all_chunks += chunks.count() - - for chunk in chunks: - if chunk.user: - if chunk.user == user: - continue - else: - forced.append((chunk, chunk.user, user)) - if force: - print self.style.WARNING( - '%s assigned to %s, forcing change to %s.' % - (chunk.pretty_name(), chunk.user, user)) - else: - print self.style.WARNING( - '%s assigned to %s not to %s, skipping.' % - (chunk.pretty_name(), chunk.user, user)) - continue - chunk.user = user - chunk.save() - ticket_done = True - done_chunks += 1 - - if ticket_done: - done_tickets += 1 - - - # Print results - print - print "Results:" - print "Assignments imported from %d/%d tickets to %d/%d relevalt chunks." % ( - done_tickets, all_tickets, done_chunks, all_chunks) - if empty_users: - print "%d tickets were unassigned." % empty_users - if forced: - print "%d assignments conficts (%s):" % ( - len(forced), "changed" if force else "left") - for chunk, orig, user in forced: - print " %s: \t%s \t-> %s" % ( - chunk.pretty_name(), orig.username, user.username) - if unknown_books: - print "%d unknown books:" % len(unknown_books) - for fname in unknown_books: - print " %s" % fname - if unknown_users: - print "%d unknown users:" % len(unknown_users) - for name in unknown_users: - print " %s (%d tickets)" % (name, unknown_users[name]) - print - - - transaction.commit() - transaction.leave_transaction_management() - diff --git a/src/catalogue/migrations/0002_auto_20190307_1543.py b/src/catalogue/migrations/0002_auto_20190307_1543.py new file mode 100644 index 00000000..a85062cb --- /dev/null +++ b/src/catalogue/migrations/0002_auto_20190307_1543.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.20 on 2019-03-07 15:43 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('catalogue', '0001_initial'), + ] + + operations = [ + migrations.RemoveField( + model_name='book', + name='_short_html', + ), + migrations.RemoveField( + model_name='chunk', + name='_short_html', + ), + migrations.RemoveField( + model_name='image', + name='_short_html', + ), + ] diff --git a/src/catalogue/migrations/0003_chunk__new_publishable.py b/src/catalogue/migrations/0003_chunk__new_publishable.py new file mode 100644 index 00000000..237f3142 --- /dev/null +++ b/src/catalogue/migrations/0003_chunk__new_publishable.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.20 on 2019-03-07 15:48 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('catalogue', '0002_auto_20190307_1543'), + ] + + operations = [ + migrations.AddField( + model_name='chunk', + name='_new_publishable', + field=models.NullBooleanField(editable=False), + ), + ] diff --git a/src/catalogue/models/book.py b/src/catalogue/models/book.py index 1fcd05ac..0ed8958c 100755 --- a/src/catalogue/models/book.py +++ b/src/catalogue/models/book.py @@ -15,7 +15,6 @@ import apiclient from catalogue.helpers import cached_in_field, GalleryMerger from catalogue.models import BookPublishRecord, ChunkPublishRecord, Project from catalogue.signals import post_publish -from catalogue.tasks import refresh_instance, book_content_updated from catalogue.xml_tools import compile_text, split_xml from cover.models import Image import os @@ -36,7 +35,6 @@ class Book(models.Model): parent_number = models.IntegerField(_('parent number'), null=True, blank=True, db_index=True, editable=False) # Cache - _short_html = models.TextField(null=True, blank=True, editable=False) _single = models.NullBooleanField(editable=False, db_index=True) _new_publishable = models.NullBooleanField(editable=False) _published = models.NullBooleanField(editable=False) @@ -326,10 +324,6 @@ class Book(models.Model): return len(self) == 1 single = cached_in_field('_single')(is_single) - @cached_in_field('_short_html') - def short_html(self): - return render_to_string('catalogue/book_list/book.html', {'book': self}) - def book_info(self, publishable=True): try: book_xml = self.materialize(publishable=publishable) @@ -363,25 +357,14 @@ class Book(models.Model): Book.objects.filter(pk=self.pk).update(**update) def touch(self): - # this should only really be done when text or publishable status changes - book_content_updated.delay(self) - update = { "_new_publishable": self.is_new_publishable(), "_published": self.is_published(), "_single": self.is_single(), "_on_track": self.get_on_track(), - "_short_html": None, } Book.objects.filter(pk=self.pk).update(**update) - refresh_instance(self) - - def refresh(self): - """This should be done offline.""" - self.short_html - self.single - self.new_publishable - self.published + self.refresh_dc_cache() # Materializing & publishing # ========================== diff --git a/src/catalogue/models/chunk.py b/src/catalogue/models/chunk.py index fc3a9eae..ade5cde1 100755 --- a/src/catalogue/models/chunk.py +++ b/src/catalogue/models/chunk.py @@ -10,7 +10,6 @@ from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from catalogue.helpers import cached_in_field from catalogue.managers import VisibleManager -from catalogue.tasks import refresh_instance from dvcs import models as dvcs_models @@ -25,9 +24,9 @@ class Chunk(dvcs_models.Document): gallery_start = models.IntegerField(_('gallery start'), null=True, blank=True, default=1) # cache - _short_html = models.TextField(null=True, blank=True, editable=False) _hidden = models.NullBooleanField(editable=False) _changed = models.NullBooleanField(editable=False) + _new_publishable = models.NullBooleanField(editable=False) # managers objects = models.Manager() @@ -87,11 +86,12 @@ class Chunk(dvcs_models.Document): # State & cache # ============= - def new_publishable(self): + def is_new_publishable(self): change = self.publishable() if not change: return False return not change.publish_log.exists() + new_publishable = cached_in_field('_new_publishable')(is_new_publishable) def is_changed(self): if self.head is None: @@ -103,22 +103,10 @@ class Chunk(dvcs_models.Document): return self.book.hidden() hidden = cached_in_field('_hidden')(is_hidden) - @cached_in_field('_short_html') - def short_html(self): - return render_to_string( - 'catalogue/book_list/chunk.html', {'chunk': self}) - def touch(self): update = { "_changed": self.is_changed(), + "_new_publishable": self.is_new_publishable(), "_hidden": self.is_hidden(), - "_short_html": None, } Chunk.objects.filter(pk=self.pk).update(**update) - refresh_instance(self) - - def refresh(self): - """This should be done offline.""" - self.changed - self.hidden - self.short_html diff --git a/src/catalogue/models/image.py b/src/catalogue/models/image.py index 646dd0ae..34f61f94 100755 --- a/src/catalogue/models/image.py +++ b/src/catalogue/models/image.py @@ -10,7 +10,6 @@ from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from catalogue.helpers import cached_in_field from catalogue.models import Project -from catalogue.tasks import refresh_instance from dvcs import models as dvcs_models @@ -25,7 +24,6 @@ class Image(dvcs_models.Document): project = models.ForeignKey(Project, null=True, blank=True) # cache - _short_html = models.TextField(null=True, blank=True, editable=False) _new_publishable = models.NullBooleanField(editable=False) _published = models.NullBooleanField(editable=False) _changed = models.NullBooleanField(editable=False) @@ -122,33 +120,13 @@ class Image(dvcs_models.Document): return not self.head.publishable changed = cached_in_field('_changed')(is_changed) - @cached_in_field('_short_html') - def short_html(self): - return render_to_string( - 'catalogue/image_short.html', {'image': self}) - - def refresh(self): - """This should be done offline.""" - self.short_html - self.single - self.new_publishable - self.published - def touch(self): update = { "_changed": self.is_changed(), - "_short_html": None, "_new_publishable": self.is_new_publishable(), "_published": self.is_published(), } Image.objects.filter(pk=self.pk).update(**update) - refresh_instance(self) - - def refresh(self): - """This should be done offline.""" - self.changed - self.short_html - # Publishing # ========== diff --git a/src/catalogue/models/listeners.py b/src/catalogue/models/listeners.py index 1cfac276..2537a5bb 100755 --- a/src/catalogue/models/listeners.py +++ b/src/catalogue/models/listeners.py @@ -29,19 +29,6 @@ def image_changed(sender, instance, created, **kwargs): models.signals.post_save.connect(image_changed, sender=Image) -def user_changed(sender, instance, *args, **kwargs): - if 'last_login' in (kwargs.get('update_fields') or {}): - # Quick hack - this change seems to result from logging user in so just ignore it. - return - books = set() - for c in instance.chunk_set.all(): - books.add(c.book) - c.touch() - for b in books: - b.touch() -models.signals.post_save.connect(user_changed, sender=User) - - def publish_listener(sender, *args, **kwargs): if isinstance(sender, BookPublishRecord): sender.book.touch() diff --git a/src/catalogue/tasks.py b/src/catalogue/tasks.py deleted file mode 100644 index 9507c412..00000000 --- a/src/catalogue/tasks.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -from celery.task import task -from django.utils import translation - - -@task(ignore_result=True) -def _refresh_by_pk(cls, pk, language=None): - prev_language = translation.get_language() - if language: - translation.activate(language) - try: - cls._default_manager.get(pk=pk).refresh() - except cls.DoesNotExist: - pass - finally: - translation.activate(prev_language) - - -def refresh_instance(instance): - _refresh_by_pk.delay(type(instance), instance.pk, translation.get_language()) - - -@task(ignore_result=True) -def book_content_updated(book): - book.refresh_dc_cache() diff --git a/src/catalogue/templates/catalogue/book_detail.html b/src/catalogue/templates/catalogue/book_detail.html index 4712edf3..e2735988 100755 --- a/src/catalogue/templates/catalogue/book_detail.html +++ b/src/catalogue/templates/catalogue/book_detail.html @@ -35,7 +35,7 @@ {% for chunk in book %} - {{ chunk.short_html|safe }} + {% include 'catalogue/book_list/chunk.html' %} {% endfor %}
diff --git a/src/catalogue/templates/catalogue/book_list/book.html b/src/catalogue/templates/catalogue/book_list/book.html index f6a0fcd2..c47e2bcd 100755 --- a/src/catalogue/templates/catalogue/book_list/book.html +++ b/src/catalogue/templates/catalogue/book_list/book.html @@ -2,7 +2,7 @@ {% load username from common_tags %} {% if book.single %} - {% with book.0 as chunk %} + {% with chunk as chunk %} [B] diff --git a/src/catalogue/templates/catalogue/book_list/book_list.html b/src/catalogue/templates/catalogue/book_list/book_list.html index e238827b..25a2e00c 100755 --- a/src/catalogue/templates/catalogue/book_list/book_list.html +++ b/src/catalogue/templates/catalogue/book_list/book_list.html @@ -19,10 +19,7 @@ - - - +
{% for item in books %} - {% with item.book as book %} - {{ book.short_html|safe }} + {% with book=item.book chunk=item.chunks.0 %} + {% include 'catalogue/book_list/book.html' %} {% if not book.single %} {% for chunk in item.chunks %} - {{ chunk.short_html|safe }} + {% include 'catalogue/book_list/chunk.html' %} {% endfor %} {% endif %} {% endwith %} diff --git a/src/catalogue/templates/catalogue/image_table.html b/src/catalogue/templates/catalogue/image_table.html index e6caedda..be89e719 100755 --- a/src/catalogue/templates/catalogue/image_table.html +++ b/src/catalogue/templates/catalogue/image_table.html @@ -69,8 +69,8 @@ {% with cnt=objects|length %} {% autopaginate objects 100 %} - {% for item in objects %} - {{ item.short_html|safe }} + {% for image in objects %} + {% include 'catalogue/image_short.html' %} {% endfor %} {% paginate %} diff --git a/src/catalogue/templatetags/book_list.py b/src/catalogue/templatetags/book_list.py index a916f30a..b9130a8d 100755 --- a/src/catalogue/templatetags/book_list.py +++ b/src/catalogue/templatetags/book_list.py @@ -12,7 +12,7 @@ register = template.Library() class ChunksList(object): def __init__(self, chunk_qs): - self.chunk_qs = chunk_qs.select_related('book') + self.chunk_qs = chunk_qs.select_related('book', 'book__project', 'stage', 'user') self.book_qs = chunk_qs.values('book_id') def __getitem__(self, key): @@ -158,7 +158,7 @@ def image_list_filter(request, **kwargs): def arg_or_GET(field): return kwargs.get(field, request.GET.get(field)) - images = Image.objects.all() + images = Image.objects.all().select_related('user', 'stage', 'project') if not request.user.is_authenticated(): images = images.filter(public=True) diff --git a/src/catalogue/tests/test_gallery.py b/src/catalogue/tests/test_gallery.py index 5c239ad2..1452c1ad 100644 --- a/src/catalogue/tests/test_gallery.py +++ b/src/catalogue/tests/test_gallery.py @@ -45,8 +45,6 @@ class GalleryAppendTests(TestCase): c.gallery_start = 3 c.save() - print "gallery starts:",self.book2[0].gallery_start, self.book2[1].gallery_start - self.make_gallery(self.book1, { '1-0001_1l' : 'aa', '1-0001_2r' : 'bb', @@ -65,7 +63,6 @@ class GalleryAppendTests(TestCase): files = listdir(join(self.scandir, self.book1.gallery)) files.sort() - print files self.assertEqual(files, [ '1-0001_1l', '1-0001_2r', @@ -100,7 +97,6 @@ class GalleryAppendTests(TestCase): files = listdir(join(self.scandir, self.book1.gallery)) files.sort() - print files self.assertEqual(files, [ '0-0001_1l', '0-0001_2r', @@ -133,7 +129,6 @@ class GalleryAppendTests(TestCase): files = listdir(join(self.scandir, self.book1.gallery)) files.sort() - print files self.assertEqual(files, [ '0-1-0001_1l', '0-1-0001_2r', diff --git a/src/redakcja/__init__.py b/src/redakcja/__init__.py index b64e43e8..e69de29b 100644 --- a/src/redakcja/__init__.py +++ b/src/redakcja/__init__.py @@ -1,5 +0,0 @@ -from __future__ import absolute_import - -# This will make sure the app is always imported when -# Django starts so that shared_task will use this app. -from .celery import app as celery_app diff --git a/src/redakcja/celery.py b/src/redakcja/celery.py deleted file mode 100644 index a2fed69b..00000000 --- a/src/redakcja/celery.py +++ /dev/null @@ -1,23 +0,0 @@ -from __future__ import absolute_import - -import os -import sys - -ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -sys.path = [ - os.path.join(ROOT, 'apps'), - os.path.join(ROOT, 'lib'), - os.path.join(ROOT, 'lib/librarian'), -] + sys.path - -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'redakcja.localsettings') - -from celery import Celery -from django.conf import settings - -app = Celery('redakcja') - -# Using a string here means the worker will not have to -# pickle the object when using Windows. -app.config_from_object('django.conf:settings') -app.autodiscover_tasks(lambda: settings.INSTALLED_APPS) diff --git a/src/redakcja/localsettings.sample b/src/redakcja/localsettings.sample index a0eb426e..c8ec8844 100644 --- a/src/redakcja/localsettings.sample +++ b/src/redakcja/localsettings.sample @@ -33,6 +33,4 @@ COMPRESS = False APICLIENT_WL_CONSUMER_KEY = None APICLIENT_WL_CONSUMER_SECRET = None -CELERY_ALWAYS_EAGER = False - SECRET_KEY = '' diff --git a/src/redakcja/settings/__init__.py b/src/redakcja/settings/__init__.py index cc88ab8e..5aca7f7d 100644 --- a/src/redakcja/settings/__init__.py +++ b/src/redakcja/settings/__init__.py @@ -72,7 +72,6 @@ INSTALLED_APPS = ( 'fnp_django_pagination', 'django_gravatar', 'fileupload', - 'kombu.transport.django', 'pipeline', 'fnpdjango', @@ -91,10 +90,6 @@ if DEBUG: LOGIN_REDIRECT_URL = '/documents/user' -CELERY_EAGER_PROPAGATES_EXCEPTIONS = True -CELERY_SEND_TASK_ERROR_EMAILS = True -CELERY_ACCEPT_CONTENT = ['pickle'] # Remove when all tasks jsonable. - MIN_COVER_SIZE = (915, 1270) STATICFILES_FINDERS = ( diff --git a/src/redakcja/settings/test.py b/src/redakcja/settings/test.py index 55cc3e63..fb27d3c5 100644 --- a/src/redakcja/settings/test.py +++ b/src/redakcja/settings/test.py @@ -15,7 +15,6 @@ import tempfile CATALOGUE_REPO_PATH = tempfile.mkdtemp(prefix='redakcja-repo') CATALOGUE_IMAGE_REPO_PATH = tempfile.mkdtemp(prefix='redakcja-repo-img') MEDIA_ROOT = tempfile.mkdtemp(prefix='media-root') -CELERY_ALWAYS_EAGER = True INSTALLED_APPS += ('dvcs.tests',) diff --git a/src/wiki_img/templates/wiki_img/document_details.html b/src/wiki_img/templates/wiki_img/document_details.html index 0dfc9aed..82c5a0f7 100644 --- a/src/wiki_img/templates/wiki_img/document_details.html +++ b/src/wiki_img/templates/wiki_img/document_details.html @@ -9,7 +9,7 @@ {% endblock %} {% block tabs-menu %} - {% include "wiki_img/tabs/summary_view_item.html" %} + {#% include "wiki_img/tabs/summary_view_item.html" %#} {% include "wiki_img/tabs/motifs_editor_item.html" %} {% include "wiki_img/tabs/objects_editor_item.html" %} {% include "wiki_img/tabs/source_editor_item.html" %} @@ -17,7 +17,7 @@ {% endblock %} {% block tabs-content %} - {% include "wiki_img/tabs/summary_view.html" %} + {#% include "wiki_img/tabs/summary_view.html" %#} {% include "wiki_img/tabs/motifs_editor.html" %} {% include "wiki_img/tabs/objects_editor.html" %} {% include "wiki_img/tabs/source_editor.html" %} diff --git a/src/wiki_img/templates/wiki_img/tabs/summary_view.html b/src/wiki_img/templates/wiki_img/tabs/summary_view.html deleted file mode 100644 index a908f553..00000000 --- a/src/wiki_img/templates/wiki_img/tabs/summary_view.html +++ /dev/null @@ -1,24 +0,0 @@ -{% load i18n %} -{% load wiki %} - diff --git a/src/wiki_img/templates/wiki_img/tabs/summary_view_item.html b/src/wiki_img/templates/wiki_img/tabs/summary_view_item.html deleted file mode 100644 index bae3ea5d..00000000 --- a/src/wiki_img/templates/wiki_img/tabs/summary_view_item.html +++ /dev/null @@ -1,5 +0,0 @@ -{% load i18n %} -{% load wiki %} -
  • - {% trans "Summary" %} -
  • -- 2.20.1