X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/a42b731727d0c4b8e372d001c5a1be776067eae8..340b7f2a6d8a552399511cc87747d1223df48ec0:/apps/catalogue/views.py diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index 6dd3d7ec1..e61feb6c2 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -19,6 +19,7 @@ from django.utils.http import urlquote_plus from django.utils import translation from django.utils.translation import ugettext as _, ugettext_lazy from django.views.decorators.cache import never_cache +from django.views.decorators.vary import vary_on_headers from ajaxable.utils import JSONResponse, AjaxableFormView from catalogue import models @@ -34,6 +35,7 @@ staff_required = user_passes_test(lambda user: user.is_staff) permanent_cache = get_cache('permanent') +@vary_on_headers('X-Requested-With') def catalogue(request): tags = models.Tag.objects.exclude( category__in=('set', 'book')).exclude(book_count=0)