Skip to content

Instantly share code, notes, and snippets.

View mmcfarland's full-sized avatar

Matt McFarland mmcfarland

View GitHub Profile
@mmcfarland
mmcfarland / bhna.geojson
Created July 31, 2013 17:11 — forked from anonymous/map.geojson
Boundary for Baynton Hill Neighbors Association
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def jsonp(f):
"""Wrap a json response in a callback, and set the mimetype (Content-Type) header accordingly
(will wrap in text/javascript if there is a callback). If the "callback" or "jsonp" paramters
are provided, will wrap the json output in callback({thejson})
Usage:
@jsonp
def my_json_view(request):
d = { 'key': 'value' }