diff options
author | luxagraf <sng@luxagraf> | 2021-01-29 21:38:49 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf> | 2021-01-29 21:38:49 -0500 |
commit | 5c159510ed40aab22be00343ddd04d0395b2f395 (patch) | |
tree | aafa0ac7b6bff90d220a7a79a4544e3e978f51b0 /app/lttr/views.py | |
parent | a9f3a16398ca8f463bf4618f654ef25f5b85f1e5 (diff) |
created Range newsletter templates
Diffstat (limited to 'app/lttr/views.py')
-rw-r--r-- | app/lttr/views.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/lttr/views.py b/app/lttr/views.py index 6b8c60a..9b739a1 100644 --- a/app/lttr/views.py +++ b/app/lttr/views.py @@ -55,6 +55,7 @@ class NewsletterListView(ListView): context['breadcrumbs'] = [self.kwargs['slug'],] return context + class NewsletterOptionsView(ListView): model = Newsletter @@ -114,6 +115,7 @@ class NewsletterSubscribeView(CreateView): return super(NewsletterSubscribeView, self).form_invalid(form) return super(NewsletterSubscribeView, self).form_valid(form) + class UnsubscribeRequestView(DetailView): model = Subscriber template_name = "lttr/unsubscribe.html" @@ -131,3 +133,18 @@ class UnsubscribeRequestView(DetailView): context['newsletter'] = self.kwargs['slug'] return context +class NewsletterRSSFeedView(Feed): + title = "Luxagraf: Range, A Weekly Photo" + link = "/newsletter/range/" + description = "Latest Range Newsletter" + description_template = 'feeds/blog_description.html' + + def items(self): + return NewsletterMailing.objects.filter(newsletter__slug='ranger',status__exact=1) + + def item_pubdate(self, item): + """ + Takes an item, as returned by items(), and returns the item's + pubdate. + """ + |