From 03b16118bd180d3c09452174fd2d4546945d0c48 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Fri, 22 Aug 2008 17:07:45 +0200 Subject: [PATCH 1/1] Fixed searching for books. --- catalogue/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/catalogue/views.py b/catalogue/views.py index 0166133a7..ed0436e64 100644 --- a/catalogue/views.py +++ b/catalogue/views.py @@ -39,6 +39,7 @@ def search(request): print "%r, %r" % (query, tags) try: book = models.Book.objects.get(title=query) + return HttpResponseRedirect(book.get_absolute_url()) except models.Book.DoesNotExist: return HttpResponseRedirect(reverse('catalogue.views.main_page')) else: -- 2.20.1