X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/0e9ce396fab5cdfc2f1806bae43f05de77cb1e21..ad39c2501159fa52e980c95af3e735e36b459c15:/apps/search/views.py?ds=inline diff --git a/apps/search/views.py b/apps/search/views.py index 514dc6e1f..a50897199 100644 --- a/apps/search/views.py +++ b/apps/search/views.py @@ -59,10 +59,11 @@ def did_you_mean(query, tokens): # return query +@cache.never_cache def hint(request): prefix = request.GET.get('term', '') if len(prefix) < 2: - return JsonResponse([]) + return JsonResponse([], safe=False) prefix = remove_query_syntax_chars(prefix) @@ -106,9 +107,10 @@ def hint(request): return HttpResponse("%s(%s);" % (callback, json.dumps(data)), content_type="application/json; charset=utf-8") else: - return JsonResponse(data) + return JsonResponse(data, safe=False) +@cache.never_cache def main(request): results = {}