diff options
Diffstat (limited to 'app/posts/views')
-rw-r--r-- | app/posts/views/essay_views.py | 6 | ||||
-rw-r--r-- | app/posts/views/range_views.py | 21 |
2 files changed, 7 insertions, 20 deletions
diff --git a/app/posts/views/essay_views.py b/app/posts/views/essay_views.py index 76a022c..41fbc03 100644 --- a/app/posts/views/essay_views.py +++ b/app/posts/views/essay_views.py @@ -71,7 +71,11 @@ class EssayDetailView(LuxDetailView): def get_template_names(self): obj = self.get_object() - return ["posts/essay_detail.html"] + if obj.template_name == 1: + t = "posts/essay_detail_lt.html" + else: + t = "posts/essay_detail.html" + return t class EssayDetailViewTXT(EssayDetailView): diff --git a/app/posts/views/range_views.py b/app/posts/views/range_views.py index b358051..7ef5054 100644 --- a/app/posts/views/range_views.py +++ b/app/posts/views/range_views.py @@ -20,30 +20,13 @@ from sightings.models import Sighting class RangeListView(PaginatedListView): """ - Return a list of Newsletter posts in reverse chronological order + Return a list of Essay posts in reverse chronological order """ model = Post template_name = "posts/range_list.html" - queryset = Post.objects.filter(post_type__in=[PostType.ESSAY,PostType.FILM],status=1).order_by('-pub_date') + queryset = Post.objects.filter(post_type__in=[PostType.ESSAY],status=1).order_by('-pub_date') def get_context_data(self, **kwargs): context = super(RangeListView, self).get_context_data(**kwargs) context['breadcrumbs'] = ['range',] return context - - -class RangeRSSFeedView(Feed): - title = "Range: A weekly photo, developed" - link = "/range/" - description = "Range: A weekly photo, developed" - description_template = 'feeds/blog_description.html' - - def items(self): - return Post.objects.filter(status__exact=1).filter(post_type=PostType.RANGE).order_by('-pub_date')[:10] - - def item_pubdate(self, item): - """ - Takes an item, as returned by items(), and returns the item's - pubdate. - """ - return item.pub_date |