and I needed to manually construct the dictionary for feeding
a json object, instead of just handing the json.dumps function a
random django object.
unlike the RDFa template which can just operate on the django ORM object.
require_api_key(request)
# what validation should we do on library_id?
- lib = get_object_or_404(Library, library_id=library_id)
+ lib = library_dict(library_id)
+ if lib is None:
+ raise Http404
lib_json = json.dumps(lib)
return HttpResponse(lib_json, mimetype='application/json')