summaryrefslogtreecommitdiff
path: root/app/photos/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/photos/views.py')
-rw-r--r--app/photos/views.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/photos/views.py b/app/photos/views.py
index 4b89e4c..bb94fbe 100644
--- a/app/photos/views.py
+++ b/app/photos/views.py
@@ -29,6 +29,25 @@ class PrivateGalleryList(PaginatedListView):
context['is_private'] = True
return context
+class Gallery(DetailView):
+ model = LuxGallery
+ slug_field = "slug"
+ template_name = "details/photo_gallery.html"
+
+
+class GalleryList(PaginatedListView):
+ template_name = 'archives/gallery_list.html'
+
+ def get_queryset(self):
+ return LuxGallery.objects.filter(is_public=True)
+
+ def get_context_data(self, **kwargs):
+ # Call the base implementation first to get a context
+ context = super(GalleryList, self).get_context_data(**kwargs)
+ context['is_private'] = False
+ return context
+
+
def gallery_list(request, page):
request.page_url = '/photos/%d/'
request.page = int(page)