summaryrefslogtreecommitdiff
path: root/app/posts/views
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2020-08-06 22:12:11 -0400
committerluxagraf <sng@luxagraf.net>2020-08-06 22:12:11 -0400
commitb21ee9e325cd71e2061222b06b7929068bdb79ae (patch)
treeca0f5d6ad34eaf4dbf155d8249af0b91c7862591 /app/posts/views
parent21b0006e218f27af8eb7cba81a1b854892bfd5a8 (diff)
added builder for src and guides via posts
Diffstat (limited to 'app/posts/views')
-rw-r--r--app/posts/views/src_views.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/posts/views/src_views.py b/app/posts/views/src_views.py
index afb6a6d..5265707 100644
--- a/app/posts/views/src_views.py
+++ b/app/posts/views/src_views.py
@@ -7,6 +7,7 @@ from django.conf import settings
#from paypal.standard.forms import PayPalPaymentsForm
from utils.views import PaginatedListView
from ..models import Post, PostType
+from taxonomy.models import Category
class SrcListView(PaginatedListView):
@@ -39,12 +40,12 @@ class TopicListView(ListView):
template_name = 'src/topic_list.html'
def get_queryset(self):
- return SrcPost.objects.filter(topics__slug=self.kwargs['slug'])
+ return Post.objects.filter(topics__slug=self.kwargs['slug'],post_type=PostType.SRC)
def get_context_data(self, **kwargs):
# Call the base implementation first to get a context
context = super(TopicListView, self).get_context_data(**kwargs)
- context['topic'] = Topic.objects.get(slug__exact=self.kwargs['slug'])
+ context['topic'] = Category.objects.get(slug__exact=self.kwargs['slug'])
return context