summaryrefslogtreecommitdiff
path: root/app/photos/views.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2018-02-05 11:20:47 -0600
committerluxagraf <sng@luxagraf.net>2018-02-05 11:20:47 -0600
commitad112641f01a0fd36d0b738b6903dea3eadbf000 (patch)
tree9be71f246c4663c742e24eb55af03dd8da577da2 /app/photos/views.py
parentc037ed30f9d5845e46672ce5fdc39ef206b52040 (diff)
added next links to view
Diffstat (limited to 'app/photos/views.py')
-rw-r--r--app/photos/views.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/photos/views.py b/app/photos/views.py
index 0a7e256..fd32828 100644
--- a/app/photos/views.py
+++ b/app/photos/views.py
@@ -72,8 +72,11 @@ def photo_json(request, slug):
def photo_preview_json(request, pk):
p = LuxImage.objects.get(pk=pk)
- url = p.get_admin_image()
- return HttpResponse(url)
+ data = ()
+ data['url'] = p.get_admin_image()
+ data['prev'] = p.get_previous_admin_url()
+ data['next'] = p.get_next_admin_url()
+ return HttpResponse(serializers.serialize('json', data), mimetype='application/json')
def gallery_list_by_area(request, slug, page):