oxdata/oxdata/cover/views.py

14 lines
355 B
Python

# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
from __future__ import division, print_function, absolute_import
from oxdjango.shortcuts import render_to_json_response
from . import models
def cover(request):
isbn = request.GET['isbn']
json = models.getCovers(isbn, request.build_absolute_uri('/'))
return render_to_json_response(json)