X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/068c98b54439d470e060aa6543e09f31e51d0370..4abdab4d76b494343946a10b9c6cd7c7d28f5e57:/catalogue/views.py?ds=sidebyside diff --git a/catalogue/views.py b/catalogue/views.py index 0166133a7..49f41965f 100644 --- a/catalogue/views.py +++ b/catalogue/views.py @@ -36,9 +36,9 @@ def search(request): tag_list = models.Tag.get_tag_list(tags) tag = models.Tag.objects.get(name=query) except models.Tag.DoesNotExist: - 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: