Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using jsonp with the django-rest-framework

The django rest framework release notes claim that JSONP support was added back in 0.3.0. I also found a JSONPRenderer class in the framework. However, I can't seem to find any documentation on how to use the thing... I'm fairly new to jsonp.

Has anyone ever successfully used jsonp with the django rest framework?

like image 965
Troy Avatar asked Aug 05 '12 00:08

Troy


1 Answers

While posting this, I found the answer (or at least AN answer). It appears that the jsonp renderer is available by default on a ModelResource, so all you need to do is add "?format=json-p" to the requesting url.

like image 168
Troy Avatar answered Jan 03 '23 11:01

Troy