aboutsummaryrefslogtreecommitdiffstats
path: root/ryuslash/aggregator/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'ryuslash/aggregator/views.py')
-rw-r--r--ryuslash/aggregator/views.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/ryuslash/aggregator/views.py b/ryuslash/aggregator/views.py
index 80eaadd..e16be11 100644
--- a/ryuslash/aggregator/views.py
+++ b/ryuslash/aggregator/views.py
@@ -5,9 +5,16 @@ from django.shortcuts import render
from aggregator.models import Post
+def _get_category(cat):
+ if cat == 'activity':
+ return 1
+ else:
+ return 0
+
+
def posts(request, cat, page=1):
- category = cat or 'post'
- queryset = Post.objects.filter(category=category)
+ category = _get_category(cat)
+ queryset = Post.objects.filter(feed__category=category)
paginator = Paginator(queryset, 20)
if page is None: