Commit 79a9c7695f1085486b29dad5011292388faa3658
1 parent
81b96087
Exists in
master
and in
5 other branches
showing categories that have only related courses
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
courses/views.py
... | ... | @@ -29,7 +29,7 @@ class IndexView(LoginRequiredMixin, NotificationMixin, generic.ListView): |
29 | 29 | |
30 | 30 | def get_context_data(self, **kwargs): |
31 | 31 | context = super(IndexView, self).get_context_data(**kwargs) |
32 | - context['categories'] = CourseCategory.objects.all() | |
32 | + context['categories'] = CourseCategory.objects.filter(course_category = True) | |
33 | 33 | context['courses_teacher'] = Course.objects.filter(professors__name = self.request.user.name) |
34 | 34 | context['courses_student'] = Course.objects.filter(students__name = self.request.user.name) |
35 | 35 | context['categorys_courses'] = CourseCategory.objects.filter(course_category__students__name = self.request.user.name).distinct() | ... | ... |