Fixes #3073: typo in meta:description.
[wolnelektury.git] / apps / libraries / views.py
index 88f993d..f79f2a1 100644 (file)
@@ -1,7 +1,7 @@
 from django.shortcuts import render_to_response, get_object_or_404\r
 from django.template import RequestContext, Template, TemplateSyntaxError\r
 \r
-from libraries.models import Catalog\r
+from libraries.models import Catalog, Library\r
 \r
 \r
 def main_view(request):\r
@@ -12,4 +12,9 @@ def main_view(request):
 def catalog_view(request, slug):\r
     context = RequestContext(request)\r
     context['catalog'] = get_object_or_404(Catalog.objects.filter(slug = slug).select_related())\r
-    return render_to_response('libraries/catalog_view.html', context_instance = context)
\ No newline at end of file
+    return render_to_response('libraries/catalog_view.html', context_instance = context)\r
+    \r
+def library_view(request, catalog_slug, slug):\r
+    context = RequestContext(request)\r
+    context['library'] = get_object_or_404(Library.objects.filter(slug = slug).filter(catalog__slug = catalog_slug))\r
+    return render_to_response('libraries/library_view.html', context_instance = context)
\ No newline at end of file