Merge branch 'master' into obrazy
authorMarcin Koziej <marcin@lolownia.org>
Sat, 7 Dec 2013 18:16:09 +0000 (19:16 +0100)
committerMarcin Koziej <marcin@lolownia.org>
Sat, 7 Dec 2013 18:16:09 +0000 (19:16 +0100)
1  2 
apps/catalogue/models/tag.py
apps/catalogue/urls.py
apps/catalogue/views.py

Simple merge
Simple merge
@@@ -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()