diff options
Diffstat (limited to 'app/posts/views')
-rw-r--r-- | app/posts/views/src_views.py | 5 |
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 |