This repository was archived by the owner on Nov 8, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,13 @@ <h2 class="text-center">
1818 < h3 > Category</ h3 >
1919 </ th >
2020 {% endif %}
21- < th class ="col-sm-1 ">
21+ < th class ="col-sm-2 ">
2222 < h3 > Post</ h3 >
2323 </ th >
2424 < th class ="col-sm-4 ">
2525 < h3 > Description</ h3 >
2626 </ th >
27- < th class ="col-sm-2 ">
27+ < th class ="col-sm-3 ">
2828 < h3 > </ h3 >
2929 </ th >
3030 < th class ="col-sm-1 ">
Original file line number Diff line number Diff line change @@ -162,15 +162,15 @@ def get_queryset(self):
162162
163163 if query :
164164 if category == 'pcsa' :
165- result = ghnPost .objects .filter (title__contains = query )
165+ result = ghnPost .objects .filter (title__icontains = query )
166166 elif category == 'pcsa_safety_tools' :
167- result = SafetyToolsPost .objects .filter (title__contains = query )
167+ result = SafetyToolsPost .objects .filter (title__icontains = query )
168168 elif category == 'malaria' :
169- result = Post .objects .filter (title_post__contains = query )
169+ result = Post .objects .filter (title_post__icontains = query )
170170 else :
171- result = chain (Post .objects .filter (title_post__contains = query ),
172- ghnPost .objects .filter (title__contains = query ),
173- SafetyToolsPost .objects .filter (title__contains = query ))
171+ result = list ( chain (Post .objects .filter (title_post__icontains = query ),
172+ ghnPost .objects .filter (title__icontains = query ),
173+ SafetyToolsPost .objects .filter (title__icontains = query ) ))
174174 return result
175175
176176 def get_context_data (self , ** kwargs ):
You can’t perform that action at this time.
0 commit comments