fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fixed searching for books.
[wolnelektury.git]
/
catalogue
/
views.py
diff --git
a/catalogue/views.py
b/catalogue/views.py
index
0166133
..
ed0436e
100644
(file)
--- 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: