summaryrefslogtreecommitdiff
path: root/app/posts/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/posts/views')
-rw-r--r--app/posts/views/range_views.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/posts/views/range_views.py b/app/posts/views/range_views.py
index 0a808b8..da3b61f 100644
--- a/app/posts/views/range_views.py
+++ b/app/posts/views/range_views.py
@@ -13,6 +13,7 @@ from utils.views import PaginatedListView, LuxDetailView
#from ..models import Entry, HomepageCurrator, Home
from ..models import Post, PostType
+from lttr.models import NewsletterMailing
from locations.models import LuxCheckIn, Country, Region, Location
from sightings.models import Sighting
@@ -29,8 +30,10 @@ class RangeDetailView(LuxDetailView):
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