+
+@cache.never_cache
+def search(request):
+ filters = SearchFilters(request.GET)
+ ctx = {
+ 'title': 'Wynik wyszukiwania',
+ 'query': filters.data['q'],
+ 'filters': filters,
+ }
+ if filters.is_valid():
+ ctx['results'] = filters.results()
+ for k, v in ctx['results'].items():
+ if v:
+ ctx['hasresults'] = True
+ break
+ return render(request, 'search/results.html', ctx)
+
+