diff options
author | luxagraf <sng@luxagraf.net> | 2016-09-26 22:55:41 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2016-09-26 22:55:41 -0400 |
commit | 1c656d42f8f00b7202621c1aa392d718dcc6c7cd (patch) | |
tree | 134e0bf2a833637c5da62abe56b216aab129cd87 /app/photos/views.py | |
parent | f096b05e49fdd04c6a484e2b6182e68d2ff9a4a7 (diff) |
enabled public galleries new style
Diffstat (limited to 'app/photos/views.py')
-rw-r--r-- | app/photos/views.py | 19 |
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) |