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.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/photos/views.py b/app/photos/views.py
index 970bbd9..4b89e4c 100644
--- a/app/photos/views.py
+++ b/app/photos/views.py
@@ -10,12 +10,25 @@ from utils.views import PaginatedListView
from django.views.generic import ListView
from django.views.generic.detail import DetailView
+
class PrivateGallery(DetailView):
model = LuxGallery
slug_field = "slug"
template_name = "details/photo_gallery.html"
+class PrivateGalleryList(PaginatedListView):
+ template_name = 'archives/gallery_list.html'
+
+ def get_queryset(self):
+ return LuxGallery.objects.filter(is_public=False)
+
+ def get_context_data(self, **kwargs):
+ # Call the base implementation first to get a context
+ context = super(PrivateGalleryList, self).get_context_data(**kwargs)
+ context['is_private'] = True
+ return context
+
def gallery_list(request, page):
request.page_url = '/photos/%d/'
request.page = int(page)