summaryrefslogtreecommitdiff
path: root/app
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
parentc037ed30f9d5845e46672ce5fdc39ef206b52040 (diff)
added next links to view
Diffstat (limited to 'app')
-rw-r--r--app/photos/models.py1
-rw-r--r--app/photos/views.py7
2 files changed, 6 insertions, 2 deletions
diff --git a/app/photos/models.py b/app/photos/models.py
index 17295f2..d68cd09 100644
--- a/app/photos/models.py
+++ b/app/photos/models.py
@@ -10,6 +10,7 @@ from django.utils.encoding import force_text
from django.utils.html import format_html
from django.utils.text import slugify
from django.conf import settings
+from django import forms
from taggit.managers import TaggableManager
from locations.models import Location, Region
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):