summaryrefslogtreecommitdiff
path: root/apps/blog/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'apps/blog/views.py')
-rw-r--r--apps/blog/views.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/blog/views.py b/apps/blog/views.py
index 6ccdc28..ef933eb 100644
--- a/apps/blog/views.py
+++ b/apps/blog/views.py
@@ -5,7 +5,7 @@ from django.views.generic.list_detail import object_list
from django.http import Http404
-from blog.models import Entry
+from blog.models import Entry, Topic
from locations.models import Region, Country
def home(request):
@@ -36,6 +36,17 @@ def entry_list(request,page):
"""
+List of all writing
+"""
+def topic_list(request,slug,page):
+ request.page_url = '/topics/'+slug+'/%d/'
+ request.page = int(page)
+ topic = Topic.objects.get(slug=slug)
+ qs = Entry.objects.filter(status__exact=1,topics=topic).order_by('-pub_date').select_related()
+ return object_list(request, queryset=qs, template_name='archives/topics.html',)
+
+
+"""
Grabs entries by region or country
"""
def entry_list_by_area(request,slug,page):