From: Marcin Koziej Date: Sat, 7 Dec 2013 18:16:09 +0000 (+0100) Subject: Merge branch 'master' into obrazy X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/3726f9b225fb5c39cbf067f53d4cf6f7d8a9f326?hp=--cc Merge branch 'master' into obrazy --- 3726f9b225fb5c39cbf067f53d4cf6f7d8a9f326 diff --cc apps/catalogue/views.py index 27d141fb5,d2b79c7ee..2acafcfd0 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@@ -37,15 -36,14 +37,15 @@@ permanent_cache = get_cache('permanent' @vary_on_headers('X-Requested-With') def catalogue(request): - cache_key='catalogue.catalogue' + cache_key='catalogue.catalogue/' + get_language() output = permanent_cache.get(cache_key) + if output is None: tags = models.Tag.objects.exclude( - category__in=('set', 'book')).exclude(book_count=0) + category__in=('set', 'book')).exclude(book_count=0, picture_count=0) tags = list(tags) for tag in tags: - tag.count = tag.book_count + tag.count = tag.book_count + tag.picture_count categories = split_tags(tags) fragment_tags = categories.get('theme', []) collections = models.Collection.objects.all()