diff options
author | luxagraf <sng@luxagraf.net> | 2025-03-23 09:12:17 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2025-03-23 09:12:17 -0500 |
commit | 1ddbab18a649a8da32d1e574b3f14f45975efabb (patch) | |
tree | 0069518448804bf35ac2919750e9c84e5eeeaaf8 /app/posts/views | |
parent | fa4f915ccf415136b7d4bb25f9ed84e4abe3b518 (diff) |
posts: added photo essay detail page and build
Diffstat (limited to 'app/posts/views')
-rw-r--r-- | app/posts/views/photo_essay_views.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/app/posts/views/photo_essay_views.py b/app/posts/views/photo_essay_views.py index 4f08910..8c35621 100644 --- a/app/posts/views/photo_essay_views.py +++ b/app/posts/views/photo_essay_views.py @@ -14,13 +14,11 @@ from taxonomy.models import Category class PhotoEssayListView(PaginatedListView): model = Post # TODO: change this when I have an actual archive to show - template_name = "photo_essay_detail.html" + template_name = "photo_essay_list.html" def get_queryset(self): queryset = super(PhotoEssayListView, self).get_queryset() - return queryset.get(slug="dawn") - # real queryset - #return queryset.filter(site__domain='luxagraf.net').filter(post_type__in=[PostType.PHOTO_ESSAY]).filter(status__exact=1).order_by('-pub_date').prefetch_related('location').prefetch_related('featured_image') + return queryset.filter(site__domain='luxagraf.net').filter(post_type__in=[PostType.PHOTO_ESSAY]).filter(status__exact=1).order_by('-pub_date').prefetch_related('location').prefetch_related('featured_image') def get_context_data(self, **kwargs): ''' @@ -48,10 +46,10 @@ class PhotoEssayDetailView(LuxDetailView): related.append(model.objects.get(slug=obj.slug, pub_date=obj.pub_date)) context['related'] = related context['breadcrumbs'] = ('Photos',) - context['crumb_url'] = reverse('posts:photo-essay-list') + context['crumb_url'] = reverse('photo_essay:list') return context def get_template_names(self): obj = self.get_object() - return ["film_detail.html"] + return ["photo_essay_detail.html"] |