diff options
author | luxagraf <sng@luxagraf.net> | 2018-02-05 13:42:45 -0600 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2018-02-05 13:42:45 -0600 |
commit | 81a27aa6aa4f60ee11b60983a561f4c4f8cca607 (patch) | |
tree | 6e4ec33630dd53f86a7ade8d826e7911dc2a4eef | |
parent | 0bb83e83be0c7ff63c488da94a66e6c526a28534 (diff) |
changed simplejson to json in photos
-rw-r--r-- | app/photos/views.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/photos/views.py b/app/photos/views.py index c0daf4d..d2ecd39 100644 --- a/app/photos/views.py +++ b/app/photos/views.py @@ -1,3 +1,4 @@ +import json from django.shortcuts import render_to_response from django.template import RequestContext from django.http import Http404, HttpResponse @@ -69,15 +70,12 @@ def photo_json(request, slug): p = PhotoGallery.objects.filter(set_slug=slug) return HttpResponse(serializers.serialize('json', p), mimetype='application/json') -import simplejson def photo_preview_json(request, pk): p = LuxImage.objects.get(pk=pk) data = {} data['url'] = p.get_admin_image() - data['prev'] = p.get_previous_admin_url - data['next'] = p.get_next_admin_url - data = simplejson.dumps(data) + data = json.dumps(data) return HttpResponse(data) |