X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/99f6dd4f1ff0390de9a9bbd4e3352b953cb9a235..013ec8a416d4ff1ea3e1f2fa9ee2935623197ecd:/apps/libraries/views.py?ds=inline diff --git a/apps/libraries/views.py b/apps/libraries/views.py index 83ab6b14e..7e245adbd 100644 --- a/apps/libraries/views.py +++ b/apps/libraries/views.py @@ -3,7 +3,7 @@ # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.shortcuts import render_to_response, get_object_or_404 -from django.template import RequestContext, Template, TemplateSyntaxError +from django.template import RequestContext from libraries.models import Catalog, Library @@ -11,14 +11,14 @@ from libraries.models import Catalog, Library def main_view(request): context = RequestContext(request) context['catalogs'] = Catalog.objects.all() - return render_to_response('libraries/main_view.html', context_instance = context) + return render_to_response('libraries/main_view.html', context_instance=context) def catalog_view(request, slug): context = RequestContext(request) - context['catalog'] = get_object_or_404(Catalog.objects.filter(slug = slug).select_related()) - return render_to_response('libraries/catalog_view.html', context_instance = context) + context['catalog'] = get_object_or_404(Catalog.objects.filter(slug=slug).select_related()) + return render_to_response('libraries/catalog_view.html', context_instance=context) def library_view(request, catalog_slug, slug): context = RequestContext(request) - context['library'] = get_object_or_404(Library.objects.filter(slug = slug).filter(catalog__slug = catalog_slug)) - return render_to_response('libraries/library_view.html', context_instance = context) + context['library'] = get_object_or_404(Library.objects.filter(slug=slug).filter(catalog__slug=catalog_slug)) + return render_to_response('libraries/library_view.html', context_instance=context)