From: Radek Czajka Date: Wed, 31 Jul 2019 09:35:08 +0000 (+0200) Subject: Uncrazy the caching, more. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/f3e8dfa015744bd72796fdd8eff0d81f863cdc46?ds=inline;hp=c742d70c5285e01898721fc1a5ffe236781c7828 Uncrazy the caching, more. --- diff --git a/src/catalogue/models/book.py b/src/catalogue/models/book.py index 2b64ec802..a703c2a1e 100644 --- a/src/catalogue/models/book.py +++ b/src/catalogue/models/book.py @@ -28,7 +28,7 @@ from catalogue.utils import create_zip, gallery_url, gallery_path, split_tags, g from catalogue.models.tag import prefetched_relations from catalogue import app_settings from catalogue import tasks -from wolnelektury.utils import makedirs +from wolnelektury.utils import makedirs, cached_render, clear_cached_renders bofh_storage = BofhFileSystemStorage() @@ -593,6 +593,8 @@ class Book(models.Model): parent = parent.parent def flush_includes(self, languages=True): + clear_cached_renders(self.mini_box) + clear_cached_renders(self.mini_box_nolink) if not languages: return if languages is True: @@ -600,8 +602,6 @@ class Book(models.Model): flush_ssi_includes([ template % (self.pk, lang) for template in [ - '/katalog/b/%d/mini.%s.html', - '/katalog/b/%d/mini_nolink.%s.html', '/katalog/b/%d/short.%s.html', '/katalog/b/%d/wide.%s.html', '/api/include/book/%d.%s.json', @@ -803,6 +803,18 @@ class Book(models.Model): def cover_color(self): return WLCover.epoch_colors.get(self.extra_info.get('epoch'), '#000000') + @cached_render('catalogue/book_mini_box.html') + def mini_box(self): + return { + 'book': self + } + + @cached_render('catalogue/book_mini_box.html') + def mini_box_nolink(self): + return { + 'book': self, + 'no_link': True, + } def add_file_fields(): for format_ in Book.formats: diff --git a/src/catalogue/templates/catalogue/book_detail.html b/src/catalogue/templates/catalogue/book_detail.html index a5be89bad..e0e89e0e4 100644 --- a/src/catalogue/templates/catalogue/book_detail.html +++ b/src/catalogue/templates/catalogue/book_detail.html @@ -1,6 +1,6 @@ {% extends "base/base.html" %} {% load i18n %} -{% load common_tags catalogue_tags %} +{% load catalogue_tags %} {% load build_absolute_uri from fnp_common %} {% load cache %} @@ -29,9 +29,7 @@

{% trans "Other versions" %}:

{% for rel in book.other_versions %} - {% cache 86400 book_mini_box rel.pk %} - {% include 'catalogue/book_mini_box.html' with book=rel %} - {% endcache %} + {{ rel.mini_box }} {% endfor %}
{% endif %} diff --git a/src/catalogue/templates/catalogue/book_list.html b/src/catalogue/templates/catalogue/book_list.html index b5c3b60ca..d11daffc6 100644 --- a/src/catalogue/templates/catalogue/book_list.html +++ b/src/catalogue/templates/catalogue/book_list.html @@ -1,7 +1,7 @@ {% extends "base/base.html" %} {% load i18n %} {% load catalogue_tags %} -{% load ssi_include from ssify %} +{% load chunk from chunks %} {% block bodyid %}book-a-list{% endblock %} @@ -13,7 +13,7 @@
{% block book_list_info %} - {% ssi_include 'chunk' key='book-list' %} + {% chunk 'book-list' %} {% endblock %}
diff --git a/src/catalogue/templates/catalogue/book_text.html b/src/catalogue/templates/catalogue/book_text.html index 27eadb0a3..b0e2f9c77 100644 --- a/src/catalogue/templates/catalogue/book_text.html +++ b/src/catalogue/templates/catalogue/book_text.html @@ -1,8 +1,7 @@ {% extends "catalogue/viewer_base.html" %} {% load i18n %} -{% load catalogue_tags ssify %} +{% load catalogue_tags %} {% load thumbnail %} -{% load cache %} {% block title %}{{ book.pretty_title }}{% endblock %} @@ -61,7 +60,7 @@ {% block big-pane %}
- + {{ book.html_file.read|safe }}
@@ -88,9 +87,7 @@ - {% cache 86400 book_mini_box other_version.pk %} - {% include 'catalogue/book_mini_box.html' with book=other_version no_link=True %} - {% endcache %} + {{ other_version.mini_box_nolink }} {% endfor %} diff --git a/src/catalogue/templates/catalogue/collection_box.html b/src/catalogue/templates/catalogue/collection_box.html index 0e2733862..c32122f32 100644 --- a/src/catalogue/templates/catalogue/collection_box.html +++ b/src/catalogue/templates/catalogue/collection_box.html @@ -1,16 +1,12 @@ {% spaceless %} {% load i18n %} - {% load ssi_include from ssify %} - {% load cache %}

{% trans "Collection" %}: {{ collection }}

{% if collection.description %} {{ collection.description|safe|truncatewords_html:40 }} {% endif %} {% for book in collection.get_books|slice:":5" %} - {% cache 86400 book_mini_box book.pk %} - {% include 'catalogue/book_mini_box.html' %} - {% endcache %} + {{ book.mini_box }} {% endfor %} {% with collection.get_books.count|add:-5 as more %} {% if more > 0 %} diff --git a/src/catalogue/templates/catalogue/daisy_list.html b/src/catalogue/templates/catalogue/daisy_list.html index 22a82d60f..0ef6878bc 100644 --- a/src/catalogue/templates/catalogue/daisy_list.html +++ b/src/catalogue/templates/catalogue/daisy_list.html @@ -1,6 +1,6 @@ {% extends "catalogue/book_list.html" %} {% load i18n %} -{% load ssi_include from ssify %} +{% load chunk from chunks %} {% block bodyid %}book-a-list{% endblock %} @@ -15,5 +15,5 @@ {% block book_list_header %}{% trans "Listing of all DAISY files" %}{% endblock %} {% block book_list_info %} - {% ssi_include 'chunk' key='daisy-list' %} + {% chunk 'daisy-list' %} {% endblock %} diff --git a/src/catalogue/templates/catalogue/related_books.html b/src/catalogue/templates/catalogue/related_books.html index db0fd357c..62e45f26d 100755 --- a/src/catalogue/templates/catalogue/related_books.html +++ b/src/catalogue/templates/catalogue/related_books.html @@ -1,27 +1,23 @@ {% spaceless %} {% load catalogue_random_book from catalogue_tags %} {% load picture_random_picture from picture_tags %} - {% load ssi_include from ssify %} - {% load cache %} {% for pic in pics %} - {% ssi_include 'picture_mini' pk=pic.pk %} + {{ pic.mini_box }} {% endfor %} {% for book in books %} - {% cache 86400 book_mini_box book.pk %} - {% include 'catalogue/book_mini_box.html' %} - {% endcache %} + {{ book.mini_box }} {% endfor %} {% if random %} - {% catalogue_random_book random_excluded_books as random_book_pk %} - {% picture_random_picture random_excluded_pics unless=random_book_pk as random_pic_pk %} - {{ random_book_pk.if }} - {% ssi_include 'catalogue_book_mini' pk=random_book_pk %} - {{ random_book_pk.endif }} - {{ random_pic_pk.if }} - {% ssi_include 'picture_mini' pk=random_pic_pk %} - {{ random_pic_pk.endif }} + {% catalogue_random_book random_excluded_books as random_book %} + {% picture_random_picture random_excluded_pics unless=random_book as random_pic %} + {% if random_book %} + {{ random_book.mini_box }} + {% endif %} + {% if random_pic %} + {{ random_pic.mini_box }} + {% endif %} {% endif %} {% endspaceless %} diff --git a/src/catalogue/templates/catalogue/tagged_object_list.html b/src/catalogue/templates/catalogue/tagged_object_list.html index 285af0ac3..e87b32dac 100644 --- a/src/catalogue/templates/catalogue/tagged_object_list.html +++ b/src/catalogue/templates/catalogue/tagged_object_list.html @@ -1,7 +1,6 @@ {% extends "base/base.html" %} {% load i18n %} {% load catalogue_tags switch_tag social_tags %} -{% load ssi_include from ssify %} {% block titleextra %}{% if tags %}{% title_from_tags tags %}{% elif list_type == 'gallery' %}{% trans "Gallery" %}{% elif list_type == 'audiobooks' %}{% trans "Audiobooks" %}{% else %}{% trans "Literature" %}{% endif %}{% endblock %} @@ -51,24 +50,6 @@ {% endif %}
- {% comment %} - {% if list_type == 'books' and not tags %} -
-

{% trans "Recent publications" %}

- {% for book in last_published %} - {% ssi_include 'catalogue_book_mini' pk=book.pk %} - {% endfor %} - {% trans "More recent publications" %} -
-
-

{% trans "Most popular books" %}

- {% for book in most_popular %} - {% ssi_include 'catalogue_book_mini' pk=book.pk %} - {% endfor %} -
- {% endif %} - {% endcomment %} - {% if theme_is_set %} {% work_list object_list %} {% else %} diff --git a/src/catalogue/templatetags/catalogue_tags.py b/src/catalogue/templatetags/catalogue_tags.py index af0370a1b..b8e9d9d84 100644 --- a/src/catalogue/templatetags/catalogue_tags.py +++ b/src/catalogue/templatetags/catalogue_tags.py @@ -456,15 +456,16 @@ def source_name(url): return source.name or netloc -@ssi_variable(register, patch_response=[add_never_cache_headers]) -def catalogue_random_book(request, exclude_ids): +@register.simple_tag +def catalogue_random_book(exclude_ids): from .. import app_settings if random() < app_settings.RELATED_RANDOM_PICTURE_CHANCE: + print('yay, picture') return None queryset = Book.objects.exclude(pk__in=exclude_ids) count = queryset.count() if count: - return queryset[randint(0, count - 1)].pk + return queryset[randint(0, count - 1)] else: return None diff --git a/src/catalogue/tests/test_visit.py b/src/catalogue/tests/test_visit.py index c170c00b4..6d31b5ebd 100644 --- a/src/catalogue/tests/test_visit.py +++ b/src/catalogue/tests/test_visit.py @@ -47,8 +47,6 @@ class VisitTest(WLTestCase): 'daisy/', # 'autor/jane-doe/gatunek/genre/', # 'autor/jane-doe/gatunek/genre/motyw/sielanka/', - '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, 'b/%d/wide.pl.html' % self.book.pk, 'f/%d/promo.pl.html' % self.book.fragments.all()[0].pk, @@ -63,8 +61,6 @@ class VisitTest(WLTestCase): 'autor/nonexistent/', # Nonexistent author. 'motyw/nonexistent/', # Nonexistent theme. 'zh.json', # Nonexistent language. - 'b/%d/mini.pl.html' % (self.book.pk + 100), # Nonexistent book. - 'b/%d/mini_nolink.pl.html' % (self.book.pk + 100), # Nonexistent book. 'b/%d/short.pl.html' % (self.book.pk + 100), # Nonexistent book. 'b/%d/wide.pl.html' % (self.book.pk + 100), # Nonexistent book. 'f/%d/promo.pl.html' % (self.book.fragments.all()[0].pk + 100), # Nonexistent fragment. diff --git a/src/catalogue/urls.py b/src/catalogue/urls.py index 63134f5b3..16c4567ca 100644 --- a/src/catalogue/urls.py +++ b/src/catalogue/urls.py @@ -20,7 +20,6 @@ urlpatterns = [ url(r'^obraz/(?P%s).html$' % SLUG, picture.views.picture_viewer, name='picture_viewer'), url(r'^obraz/(?P%s)/$' % SLUG, picture.views.picture_detail, name='picture_detail'), - url(r'^p/(?P\d+)/mini\.(?P.+)\.html', picture.views.picture_mini, name='picture_mini'), url(r'^p/(?P\d+)/short\.(?P.+)\.html', picture.views.picture_short, name='picture_short'), url(r'^pa/(?P\d+)/short\.(?P.+)\.html', picture.views.picturearea_short, name='picture_area_short'), @@ -77,9 +76,6 @@ urlpatterns = [ url(r'^isbn/(?P(pdf|epub|mobi|txt|html))/(?P%s)/' % SLUG, views.get_isbn), # Includes. - url(r'^b/(?P\d+)/mini\.(?P.+)\.html', views.book_mini, name='catalogue_book_mini'), - url(r'^b/(?P\d+)/mini_nolink\.(?P.+)\.html', views.book_mini, {'with_link': False}, - name='catalogue_book_mini_nolink'), url(r'^b/(?P\d+)/short\.(?P.+)\.html', views.book_short, name='catalogue_book_short'), url(r'^b/(?P\d+)/wide\.(?P.+)\.html', views.book_wide, name='catalogue_book_wide'), url(r'^f/(?P\d+)/promo\.(?P.+)\.html', views.fragment_promo, name='catalogue_fragment_promo'), diff --git a/src/catalogue/views.py b/src/catalogue/views.py index b826fc21d..fca48b95e 100644 --- a/src/catalogue/views.py +++ b/src/catalogue/views.py @@ -269,6 +269,7 @@ def book_fragments(request, slug, theme_slug): }) +@never_cache def book_detail(request, slug): try: book = Book.objects.get(slug=slug) @@ -414,19 +415,6 @@ class CustomPDFFormView(AjaxableFormView): #### -@ssi_included -def book_mini(request, pk, with_link=True): - # book = get_object_or_404(Book, pk=pk) - try: - book = Book.objects.only('cover_thumb', 'title', 'language', 'slug').get(pk=pk) - except Book.DoesNotExist: - raise Http404 - return render(request, 'catalogue/book_mini_box.html', { - 'book': book, - 'no_link': not with_link, - }) - - @ssi_included(get_ssi_vars=lambda pk: (lambda ipk: ( ('ssify.get_csrf_token',), ('social_tags.likes_book', (ipk,)), diff --git a/src/chunks/models.py b/src/chunks/models.py index a9f6e7f88..56166a33e 100644 --- a/src/chunks/models.py +++ b/src/chunks/models.py @@ -1,11 +1,10 @@ -# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.conf import settings +from django.core.cache import cache from django.db import models from django.utils.translation import ugettext_lazy as _ -from ssify import flush_ssi_includes class Chunk(models.Model): @@ -28,14 +27,10 @@ class Chunk(models.Model): def save(self, *args, **kwargs): ret = super(Chunk, self).save(*args, **kwargs) - self.flush_includes() + for lc, ln in settings.LANGUAGES: + cache.delete('chunk:%s:%s' % (self.key, lc)) return ret - def flush_includes(self): - flush_ssi_includes([ - '/chunks/chunk/%s.%s.html' % (self.key, lang) - for lang in [lc for (lc, _ln) in settings.LANGUAGES]]) - class Attachment(models.Model): key = models.CharField(_('key'), help_text=_('A unique name for this attachment'), primary_key=True, max_length=255) diff --git a/src/chunks/templatetags/chunks.py b/src/chunks/templatetags/chunks.py index 1d7362607..200002b8e 100644 --- a/src/chunks/templatetags/chunks.py +++ b/src/chunks/templatetags/chunks.py @@ -1,7 +1,7 @@ -# -*- coding: utf-8 -*- from django import template from django.core.cache import cache from django.utils.safestring import mark_safe +from django.utils.translation import get_language from ..models import Chunk, Attachment @@ -11,7 +11,7 @@ register = template.Library() @register.simple_tag def chunk(key, cache_time=0): try: - cache_key = 'chunk_' + key + cache_key = 'chunk:%s:%s' % (key, get_language()) c = cache.get(cache_key) if c is None: c = Chunk.objects.get(key=key) diff --git a/src/chunks/urls.py b/src/chunks/urls.py deleted file mode 100644 index 0536a18b9..000000000 --- a/src/chunks/urls.py +++ /dev/null @@ -1,11 +0,0 @@ -# -*- coding: utf-8 -*- -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. -# -from django.conf.urls import url -from . import views - - -urlpatterns = [ - url(r'^chunk/(?P.+)\.(?P.+)\.html$', views.chunk, name='chunk'), -] diff --git a/src/chunks/views.py b/src/chunks/views.py deleted file mode 100644 index fe62ed14f..000000000 --- a/src/chunks/views.py +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. -# -from django.http import HttpResponse -from ssify import ssi_included -from .models import Chunk - - -@ssi_included -def chunk(request, key): - chunk, created = Chunk.objects.get_or_create(key=key) - return HttpResponse(chunk.content) diff --git a/src/picture/models.py b/src/picture/models.py index c853bb9b3..416c846d9 100644 --- a/src/picture/models.py +++ b/src/picture/models.py @@ -14,6 +14,7 @@ from ssify import flush_ssi_includes from catalogue.models.tag import prefetched_relations from catalogue.utils import split_tags from picture import tasks +from wolnelektury.utils import cached_render, clear_cached_renders from io import BytesIO import jsonfield import itertools @@ -342,11 +343,18 @@ class Picture(models.Model): names = [tag[0] for tag in names] return ', '.join(names) + @cached_render('picture/picture_mini_box.html') + def mini_box(self): + return { + 'picture': self, + } + def related_themes(self): return catalogue.models.Tag.objects.usage_for_queryset( self.areas.all(), counts=True).filter(category__in=('theme', 'thing')) def flush_includes(self, languages=True): + clear_cached_renders(self.mini_box) if not languages: return if languages is True: diff --git a/src/picture/templates/picture/picture_list_thumb.html b/src/picture/templates/picture/picture_list_thumb.html index 3c1dd8cc1..9fc4eb9e0 100644 --- a/src/picture/templates/picture/picture_list_thumb.html +++ b/src/picture/templates/picture/picture_list_thumb.html @@ -2,7 +2,7 @@ {% load i18n %} {% load catalogue_tags %} {% load static %} -{% load ssi_include from ssify %} +{% load chunk from chunks %} {% block bodyid %}picture-list{% endblock %} @@ -15,7 +15,7 @@
{% block book_list_info %} - {% ssi_include 'chunk' key='picture-list' %} + {% chunk 'picture-list' %} {% endblock %}
diff --git a/src/picture/templates/picture/picture_mini_box.html b/src/picture/templates/picture/picture_mini_box.html index 132f8fcc9..c1736a097 100644 --- a/src/picture/templates/picture/picture_mini_box.html +++ b/src/picture/templates/picture/picture_mini_box.html @@ -1,10 +1,9 @@ {% spaceless %} {% load thumbnail %} + {% with picture.author_unicode as author %} -{% endspaceless %} \ No newline at end of file + {% endwith %} +{% endspaceless %} diff --git a/src/picture/templatetags/picture_tags.py b/src/picture/templatetags/picture_tags.py index 3330b61d6..0542fa33c 100644 --- a/src/picture/templatetags/picture_tags.py +++ b/src/picture/templatetags/picture_tags.py @@ -7,7 +7,6 @@ from django import template from django.urls import reverse from django.utils.cache import add_never_cache_headers import sorl.thumbnail.default -from ssify import ssi_variable from catalogue.utils import split_tags from ..engine import CustomCroppingEngine from ..models import Picture @@ -65,13 +64,13 @@ def area_thumbnail_url(area, geometry): return th.url -@ssi_variable(register, patch_response=[add_never_cache_headers]) -def picture_random_picture(request, exclude_ids, unless=None): +@register.simple_tag +def picture_random_picture(exclude_ids, unless=None): if unless: return None queryset = Picture.objects.exclude(pk__in=exclude_ids).exclude(image_file='') count = queryset.count() if count: - return queryset[randint(0, count - 1)].pk + return queryset[randint(0, count - 1)] else: return None diff --git a/src/picture/views.py b/src/picture/views.py index ecd5d66cf..98485afec 100644 --- a/src/picture/views.py +++ b/src/picture/views.py @@ -102,16 +102,6 @@ def import_picture(request): return HttpResponse(_("Error importing file: %r") % import_form.errors) -@ssi_included -def picture_mini(request, pk, with_link=True): - picture = get_object_or_404(Picture, pk=pk) - return render(request, 'picture/picture_mini_box.html', { - 'picture': picture, - 'author': picture.author_unicode(), - 'with_link': with_link, - }) - - @ssi_included def picture_short(request, pk): picture = get_object_or_404(Picture, pk=pk) diff --git a/src/sponsors/models.py b/src/sponsors/models.py index dbc9b7abc..c193f427e 100644 --- a/src/sponsors/models.py +++ b/src/sponsors/models.py @@ -1,10 +1,10 @@ -# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # import json import time from io import BytesIO +from django.core.cache import cache from django.db import models from django.utils.translation import ugettext_lazy as _ from django.template.loader import render_to_string @@ -12,7 +12,6 @@ from PIL import Image from jsonfield import JSONField from django.core.files.base import ContentFile -from ssify import flush_ssi_includes THUMB_WIDTH = 120 THUMB_HEIGHT = 120 @@ -97,11 +96,8 @@ class SponsorPage(models.Model): 'page': self }) ret = super(SponsorPage, self).save(*args, **kwargs) - self.flush_includes() + cache.delete('sponsor_page:' + name) return ret - def flush_includes(self): - flush_ssi_includes(['/sponsors/page/%s.html' % self.name]) - def __str__(self): return self.name diff --git a/src/sponsors/templatetags/__init__.py b/src/sponsors/templatetags/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/sponsors/templatetags/sponsors.py b/src/sponsors/templatetags/sponsors.py new file mode 100644 index 000000000..fb586d02d --- /dev/null +++ b/src/sponsors/templatetags/sponsors.py @@ -0,0 +1,25 @@ +# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +from django import template +from django.core.cache import cache +from django.utils.safestring import mark_safe +from sponsors.models import SponsorPage + + +register = template.Library() + + +@register.simple_tag +def sponsor_page(name): + key = 'sponsor_page:' + name + content = cache.get(key) + if content is None: + try: + page = SponsorPage.objects.get(name=name) + except SponsorPage.DoesNotExist: + content = '' + else: + content = page.html + cache.set(key, content) + return mark_safe(content) diff --git a/src/sponsors/urls.py b/src/sponsors/urls.py deleted file mode 100644 index fe3898678..000000000 --- a/src/sponsors/urls.py +++ /dev/null @@ -1,11 +0,0 @@ -# -*- coding: utf-8 -*- -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. -# -from django.conf.urls import url -from . import views - - -urlpatterns = [ - url(r'^page/(?P.+)\.html$', views.page, name='sponsor_page'), -] diff --git a/src/sponsors/views.py b/src/sponsors/views.py deleted file mode 100644 index 9a340895c..000000000 --- a/src/sponsors/views.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. -# -from django.http import HttpResponse -from ssify import ssi_included -from .models import SponsorPage - - -@ssi_included(use_lang=False) -def page(request, name): - try: - page = SponsorPage.objects.get(name=name) - except SponsorPage.DoesNotExist: - return HttpResponse(u'') - return HttpResponse(page.html) diff --git a/src/wolnelektury/templates/base/app.html b/src/wolnelektury/templates/base/app.html index c10cc4c63..2f773e0e4 100644 --- a/src/wolnelektury/templates/base/app.html +++ b/src/wolnelektury/templates/base/app.html @@ -3,11 +3,7 @@ {% load pipeline i18n %} {% load static from staticfiles %} - {% load catalogue_tags funding_tags reporting_stats %} {% load piwik_tags %} - {% load ssi_include from ssify %} - {% load user_username user_is_staff from common_tags %} - {% load cache %} {% get_current_language as LANGUAGE_CODE %} @@ -60,20 +56,16 @@ diff --git a/src/wolnelektury/templates/base/superbase.html b/src/wolnelektury/templates/base/superbase.html index b03392fed..394571678 100644 --- a/src/wolnelektury/templates/base/superbase.html +++ b/src/wolnelektury/templates/base/superbase.html @@ -5,9 +5,9 @@ {% load static from staticfiles %} {% load catalogue_tags funding_tags reporting_stats %} {% load piwik_tags %} - {% load ssi_include from ssify %} - {% load user_username user_is_staff from common_tags %} {% load cache %} + {% load chunk from chunks %} + {% load sponsor_page from sponsors %} {% get_current_language as LANGUAGE_CODE %} @@ -81,31 +81,27 @@