diff --git a/courses/views.py b/courses/views.py index 792958c..94235db 100644 --- a/courses/views.py +++ b/courses/views.py @@ -450,25 +450,6 @@ class IndexCatView(LoginRequiredMixin, generic.ListView): context_object_name = 'categories' paginate_by = 5 - ''' - def get_context_data(self, **kwargs): - context = super(IndexCatView, self).get_context_data(**kwargs) - list_cat = CourseCategory.objects.filter(course_category = True).order_by('name') - paginator = Paginator(list_cat, self.paginate_by) - page = self.request.GET.get('page') - - print(list_cat) - try: - list_cat = paginator.page(page) - except PageNotAnInteger: - list_cat = paginator.page(1) - except EmptyPage: - list_cat = paginator.page(paginator.num_pages) - - context['list_cat'] = list_cat - - return context - ''' class CreateCatView(LoginRequiredMixin, HasRoleMixin, generic.edit.CreateView): allowed_roles = ['professor', 'system_admin'] -- libgit2 0.21.2