From: Marcin Koziej Date: Mon, 30 Jan 2012 09:37:42 +0000 (+0100) Subject: Merge branch 'pretty' of github.com:fnp/wolnelektury into pretty X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/fe3cc2a284f1aa7457b0ec9491203aae100681a6?hp=ffb9b20e6675a618694fb160c72df285f2666be8 Merge branch 'pretty' of github.com:fnp/wolnelektury into pretty Conflicts: lib/librarian --- diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py index 7f20b4e59..091e66148 100644 --- a/apps/catalogue/models.py +++ b/apps/catalogue/models.py @@ -763,7 +763,7 @@ class Book(models.Model): book_descendants += list(child_book.children.all()) for tag in descendants_tags: - touch_tag.delay(tag) + touch_tag(tag) book.save() @@ -1051,7 +1051,7 @@ def _tags_updated_handler(sender, affected_tags, **kwargs): # reset tag global counter # we want Tag.changed_at updated for API to know the tag was touched for tag in affected_tags: - touch_tag.delay(tag) + touch_tag(tag) # if book tags changed, reset book tag counter if isinstance(sender, Book) and \ diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index 01600f5bc..168645009 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -16,6 +16,7 @@ from django.utils.datastructures import SortedDict from django.utils.http import urlquote_plus from django.utils import translation from django.utils.translation import ugettext as _ +from django.views.decorators.cache import never_cache from ajaxable.utils import JSONResponse, AjaxableFormView @@ -95,6 +96,7 @@ def differentiate_tags(request, tags, ambiguous_slugs): context_instance=RequestContext(request)) +@never_cache def tagged_object_list(request, tags=''): try: tags = models.Tag.get_tag_list(tags) @@ -202,6 +204,7 @@ def book_fragments(request, slug, theme_slug): context_instance=RequestContext(request)) +@never_cache def book_detail(request, slug): try: book = models.Book.objects.get(slug=slug) diff --git a/wolnelektury/templates/base.html b/wolnelektury/templates/base.html index c9cfe1533..4c2c57584 100644 --- a/wolnelektury/templates/base.html +++ b/wolnelektury/templates/base.html @@ -31,7 +31,7 @@ {% cache 60 tagline LANGUAGE_CODE %} {% url book_list as b %} - {% url book_list as r %} + {% url infopage 'o-projekcie' as r %} {% count_books book_count %} {% blocktrans count book_count as c %} {{c}} free reading you have right to diff --git a/wolnelektury/templates/catalogue/book_short.html b/wolnelektury/templates/catalogue/book_short.html index 304cdc63e..424487bd4 100644 --- a/wolnelektury/templates/catalogue/book_short.html +++ b/wolnelektury/templates/catalogue/book_short.html @@ -46,6 +46,8 @@
+ {% spaceless %} + {% trans "Epoch" %}:  {% for name, slug in related.tags.epoch %} {{ name }} @@ -67,6 +69,7 @@ {% endfor %} + {% endspaceless %}
{% shelf_tags book %} diff --git a/wolnelektury/views.py b/wolnelektury/views.py index 555b732bb..01fac4686 100755 --- a/wolnelektury/views.py +++ b/wolnelektury/views.py @@ -17,6 +17,7 @@ from catalogue.models import Book from ajaxable.utils import placeholdized +@never_cache def main_page(request): last_published = Book.objects.exclude(html_file='').order_by('-created_at')[:4]