X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/1b97de98f9d2907bedc3dc15ab24b239e895e93e..2608b2bb8cf7acf29feb42ddd8213bd884ae535a:/apps/catalogue/views.py diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index 86dc74db..1f3130a0 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -24,6 +24,7 @@ from django.views.decorators.http import require_POST from unidecode import unidecode from catalogue import forms +from catalogue.filters import DocumentFilterSet from catalogue.forms import TagMultipleForm, TagSingleForm from catalogue.helpers import active_tab from catalogue.models import Category @@ -510,12 +511,16 @@ def fork(request, pk): def upcoming(request): + f = DocumentFilterSet(request.GET, queryset=Document.objects.filter(deleted=False).filter(publish_log=None)) return render(request, "catalogue/upcoming.html", { - 'objects_list': Document.objects.filter(deleted=False).filter(publish_log=None), + 'filter_set': f, + 'link_url': 'catalogue_preview', }) def finished(request): + f = DocumentFilterSet(request.GET, queryset=Document.objects.filter(deleted=False).exclude(publish_log=None)) return render(request, "catalogue/finished.html", { - 'objects_list': Document.objects.filter(deleted=False).exclude(publish_log=None), + 'filter_set': f, + 'link_url': 'catalogue_html', })