X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/b2d342589a7889a3b096e7192453d53bd28eed7d..8debf0c9926653d6fbef352fe96fcd524845ae4e:/src/search/views.py?ds=inline diff --git a/src/search/views.py b/src/search/views.py index c6759ea76..67c3fd48f 100644 --- a/src/search/views.py +++ b/src/search/views.py @@ -137,6 +137,9 @@ def main(request): return render_to_response( 'catalogue/search_too_short.html', {'prefix': query}, context_instance=RequestContext(request)) + elif len(query) > 256: + return render_to_response( + 'catalogue/search_too_long.html', {'prefix': query}, context_instance=RequestContext(request)) query = remove_query_syntax_chars(query)