Ethan Dalool
a9c7ad6993
Move flask-specific operations out of etiquette's files and into new etiquette_flask. In etiquette_site.py, etiquette calls are fully qualified.
9 lines
245 B
Python
9 lines
245 B
Python
import flask
|
|
import json
|
|
|
|
|
|
def make_json_response(j, *args, **kwargs):
|
|
dumped = json.dumps(j)
|
|
response = flask.Response(dumped, *args, **kwargs)
|
|
response.headers['Content-Type'] = 'application/json;charset=utf-8'
|
|
return response
|