diff options
Diffstat (limited to 'app/photos/views.py')
-rw-r--r-- | app/photos/views.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/photos/views.py b/app/photos/views.py index d2ecd39..0d51c8e 100644 --- a/app/photos/views.py +++ b/app/photos/views.py @@ -79,6 +79,16 @@ def photo_preview_json(request, pk): return HttpResponse(data) +def thumb_preview_json(request, pk): + p = LuxImage.objects.get(pk=pk) + thumb = p.get_image_by_size("tn") + data = {} + data['url'] = thumb[22:] + + data = json.dumps(data) + return HttpResponse(data) + + def gallery_list_by_area(request, slug, page): """Grabs entries by region or country""" request.page_url = '/photos/' + slug + '/%d/' |