Commit dc825f9ab0ff3a0aba4b3318440f10de5a0a9955
1 parent
e9573f81
Exists in
master
and in
3 other branches
modified to introduce search view
Showing
1 changed file
with
6 additions
and
0 deletions
Show diff stats
subjects/views.py
@@ -300,3 +300,9 @@ class SubjectSubscribeView(LoginRequiredMixin, TemplateView): | @@ -300,3 +300,9 @@ class SubjectSubscribeView(LoginRequiredMixin, TemplateView): | ||
300 | return JsonResponse({'url':reverse_lazy('subjects:index')}) | 300 | return JsonResponse({'url':reverse_lazy('subjects:index')}) |
301 | 301 | ||
302 | 302 | ||
303 | +class SubjectSearchView(LoginRequiredMixin, ListView): | ||
304 | + login_url = reverse_lazy("users:login") | ||
305 | + redirect_field_name = 'next' | ||
306 | + template_name = 'subjects/list.html' | ||
307 | + context_object_name = 'categories' | ||
308 | + paginate_by = 10 |