Commit 866bf3fcef92c3dadde7f3ce14af5874d48014ae

Authored by Gustavo Bernardo
1 parent f7410615

Removed useless code in IndexCatView [Issue:#398]

Showing 1 changed file with 0 additions and 19 deletions   Show diff stats
courses/views.py
@@ -450,25 +450,6 @@ class IndexCatView(LoginRequiredMixin, generic.ListView): @@ -450,25 +450,6 @@ class IndexCatView(LoginRequiredMixin, generic.ListView):
450 context_object_name = 'categories' 450 context_object_name = 'categories'
451 paginate_by = 5 451 paginate_by = 5
452 452
453 - '''  
454 - def get_context_data(self, **kwargs):  
455 - context = super(IndexCatView, self).get_context_data(**kwargs)  
456 - list_cat = CourseCategory.objects.filter(course_category = True).order_by('name')  
457 - paginator = Paginator(list_cat, self.paginate_by)  
458 - page = self.request.GET.get('page')  
459 -  
460 - print(list_cat)  
461 - try:  
462 - list_cat = paginator.page(page)  
463 - except PageNotAnInteger:  
464 - list_cat = paginator.page(1)  
465 - except EmptyPage:  
466 - list_cat = paginator.page(paginator.num_pages)  
467 -  
468 - context['list_cat'] = list_cat  
469 -  
470 - return context  
471 - '''  
472 class CreateCatView(LoginRequiredMixin, HasRoleMixin, generic.edit.CreateView): 453 class CreateCatView(LoginRequiredMixin, HasRoleMixin, generic.edit.CreateView):
473 454
474 allowed_roles = ['professor', 'system_admin'] 455 allowed_roles = ['professor', 'system_admin']