X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/357027375ff8867f42ca34bcbfb5a78b5b185fc3..ed79e41001ebd01207fcea50e09aea5ebcae8a0d:/src/libraries/views.py diff --git a/src/libraries/views.py b/src/libraries/views.py index 7e245adbd..ab4b4b76f 100644 --- a/src/libraries/views.py +++ b/src/libraries/views.py @@ -13,11 +13,13 @@ def main_view(request): context['catalogs'] = Catalog.objects.all() 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) - + + 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))