From 8d1cdba9067f16327ad223a1f4011399172fe8a4 Mon Sep 17 00:00:00 2001 From: tirilane Date: Sun, 6 Mar 2011 20:55:05 +0000 Subject: [PATCH] =?UTF-8?q?Mislykka=20fors=C3=B8k=20p=C3=A5=20=C3=A5=20set?= =?UTF-8?q?te=20hylle=20per=20kategori.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python/web/library/views.py | 2 +- python/web/templates/category/view.html | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/python/web/library/views.py b/python/web/library/views.py index a1eee0f..b1c1ae5 100644 --- a/python/web/library/views.py +++ b/python/web/library/views.py @@ -74,7 +74,7 @@ def CategoryIndex(request): def CategoryView(request,category_identifier): category = get_object_or_404(Category,id=category_identifier) book_list = category.book_set.all() - return render_to_response('category/view.html', {'category': category, 'book_list': book_list}) + return render_to_response('category/view.html', {'category': category, 'book_list': book_list}) def IndexView(request): return render_to_response('index.html', {'categories': Category.objects.all().order_by('name')}) diff --git a/python/web/templates/category/view.html b/python/web/templates/category/view.html index a9557b4..61981c9 100644 --- a/python/web/templates/category/view.html +++ b/python/web/templates/category/view.html @@ -8,9 +8,7 @@

{{ category }}

-{% if not book_list %} -Det finnes ingen bøker i denne kategorien. -{% else %} +{% if book_list %}
Bøker: