aboutsummaryrefslogtreecommitdiff
path: root/apps/forum/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'apps/forum/views.py')
-rw-r--r--apps/forum/views.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/forum/views.py b/apps/forum/views.py
index bc7cc74..1540157 100644
--- a/apps/forum/views.py
+++ b/apps/forum/views.py
@@ -17,3 +17,17 @@ from utils.views import LoggedInViewWithUser
class TopicListView(LoggedInViewWithUser, ListView):
model = Topic
+
+ def get_context_data(self, **kwargs):
+ context = super().get_context_data(**kwargs)
+ context['category_list'] = Category.objects.all()
+ return context
+
+
+class TopicDetailView(LoggedInViewWithUser, DetailView):
+ model = Topic
+
+ def get_context_data(self, **kwargs):
+ context = super().get_context_data(**kwargs)
+ context['category_list'] = Category.objects.all()
+ return context