X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/068c98b54439d470e060aa6543e09f31e51d0370..c310ca6683029b1922a5edda4857e3d1856e3487:/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: