Commit 98151318 authored by Volkov Gherman's avatar Volkov Gherman

Дозаввершил проект курсовой работы News

parent 34366f6a
...@@ -124,7 +124,10 @@ class SearchView(ListView): ...@@ -124,7 +124,10 @@ class SearchView(ListView):
if self.search_value: if self.search_value:
query = Q(title__icontains=self.search_value) | Q(text__icontains=self.search_value) query = Q(title__icontains=self.search_value) | Q(text__icontains=self.search_value)
query_set = query_set.filter(query) query_set = query_set.filter(query)
return query_set return query_set
else:
return query_set
def get_search_form(self): def get_search_form(self):
return SearchForm(self.request.GET) return SearchForm(self.request.GET)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment