|
|
@@ -119,7 +119,27 @@ def student_page(request): |
|
|
|
return render(request, 'blog_search_list_view.html', {'result':result}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TagSearch(TagCanvasListView): |
|
|
|
template_name = 'blog_search_list_view.html' |
|
|
|
model = Post |
|
|
|
context_object_name = 'list' |
|
|
|
paginate_by = 8 |
|
|
|
|
|
|
|
def get_context_data(self, **kwargs): |
|
|
|
context = super(CustomerSearch, self).get_context_data(**kwargs) |
|
|
|
context = self.get_queryset() |
|
|
|
return context |
|
|
|
|
|
|
|
def get_queryset(self): |
|
|
|
cObj = Customer.objects.all() |
|
|
|
var_get_search = self.request.GET.get('search_box') |
|
|
|
|
|
|
|
if var_get_search is not None: |
|
|
|
cObj = cObj.filter(firstname__icontains=var_get_search) |
|
|
|
if var_get_order_by is not None: |
|
|
|
cObj = cObj.order_by(var_get_order_by) |
|
|
|
return cObj |
|
|
|
|
|
|
|
def blog_search_list_view(request): |
|
|
|
return render(request, 'blog_search_list_view.html', {}) |
|
|
|
|