summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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):