X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/151ce2b12c8d669837e0b50b06e9828574bbb7cc..cb6cfc1c84798ac22313e3e44cd00ff5da601575:/apps/catalogue/views.py diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index 84cce7b2c..7addb7fc1 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -37,6 +37,7 @@ from catalogue.utils import split_tags from newtagging import views as newtagging_views from pdcounter import models as pdcounter_models from pdcounter import views as pdcounter_views +from suggest.forms import PublishingSuggestForm from slughifi import slughifi @@ -468,7 +469,9 @@ def search(request): {'tags':tag_list, 'prefix':prefix, 'results':((x, _get_result_link(x, tag_list), _get_result_type(x)) for x in result)}, context_instance=RequestContext(request)) else: - return render_to_response('catalogue/search_no_hits.html', {'tags':tag_list, 'prefix':prefix}, + form = PublishingSuggestForm(initial={"books": prefix + ", "}) + return render_to_response('catalogue/search_no_hits.html', + {'tags':tag_list, 'prefix':prefix, "pubsuggest_form": form}, context_instance=RequestContext(request))