summaryrefslogtreecommitdiff
path: root/app/posts/views/range_views.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/posts/views/range_views.py')
-rw-r--r--app/posts/views/range_views.py18
1 files changed, 1 insertions, 17 deletions
diff --git a/app/posts/views/range_views.py b/app/posts/views/range_views.py
index da3b61f..f196e5e 100644
--- a/app/posts/views/range_views.py
+++ b/app/posts/views/range_views.py
@@ -18,29 +18,13 @@ from locations.models import LuxCheckIn, Country, Region, Location
from sightings.models import Sighting
-class RangeDetailView(LuxDetailView):
- model = Post
- slug_field = "slug"
- template_name = "posts/range_detail.html"
-
- def get_context_data(self, **kwargs):
- context = super(RangeDetailView, self).get_context_data(**kwargs)
- related = []
- for obj in self.object.related.all():
- model = apps.get_model(obj.model_name.app_label, obj.model_name.model)
- related.append(model.objects.get(slug=obj.slug, pub_date=obj.pub_date))
- context['related'] = related
- context['mailing'] = NewsletterMailing.objects.get(post__id=self.object.id)
- return context
-
-
class RangeListView(PaginatedListView):
"""
Return a list of Newsletter posts in reverse chronological order
"""
model = Post
template_name = "posts/range_list.html"
- queryset = Post.objects.filter(post_type=PostType.RANGE,status=1).order_by('-pub_date')
+ queryset = Post.objects.filter(post_type__in=[PostType.ESSAY,PostType.FILM,PostType.HOWTO,PostType.REVIEW],status=1).order_by('-pub_date')
def get_context_data(self, **kwargs):
context = super(RangeListView, self).get_context_data(**kwargs)