Open GoogleCodeExporter opened 8 years ago
Proposed Patch
class JSONPResponder(JSONResponder) :
def addCallback(self, request, response):
try :
cb = request.GET['callback']
response.content = cb + "(" + response.content + ")"
except KeyError :
pass
return response
def element(self, request, *args, **kw):
response = super(JSONPResponder, self).element(request, *args, **kw)
return self.addCallback(request, response)
def list(self, request, *args, **kw):
response = super(JSONPResponder, self).list(request, *args, **kw)
return self.addCallback(request, response)
Original comment by ptar...@gmail.com
on 17 Jun 2009 at 9:21
Original issue reported on code.google.com by
ptar...@gmail.com
on 17 Jun 2009 at 8:57