Ethan Dalool
6e312bd287
Alright, I got tired of confusing myself with the same-named outer and inner package. Keep in mind that every frontend implementation is supposed to be its own independent project where etiquette is nothing but a dependency. So the name backend is not ambiguous with the etiquette backend.
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
|