Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Simple JSONP support for django

Project description

# django-jsonp
Simple JSONP support for django

[![Coverage Status](](
[![Build Status](](
[![PyPI version](](
[![Scrutinizer Code Quality](](
[![Can I Use Python 3?](](
[![Code Health](](
## Installation

Install using `pip`...

$ pip install django-jsonp

## Usage

from djsonp import jsonp, JSONPResponse, get_callback

# decorate something that returns a dict-like object
def my_view(request):
return {'foo': 'bar'}

# it can work with an HttpResponse instances
def another_view(request):
return HttpResponse("{'foo': 'bar'}")

# or just return a JSONPResponse
def jsonp_view(request):
return JSONPResponse(data={'foo': 'bar', }, callback=get_callback(request))

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django_jsonp, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size django_jsonp-0.2.0.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page