X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/65904b8667ff6f61bba5282f83ab8fdebb9af509..03b16118bd180d3c09452174fd2d4546945d0c48:/catalogue/views.py?ds=sidebyside 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: