2015-06-11 17:59:40 +00:00
|
|
|
__author__ = 'Aran'
|
|
|
|
|
|
|
|
from flask import Response
|
|
|
|
import json
|
|
|
|
|
2015-06-11 19:46:18 +00:00
|
|
|
def bad_request(message='Bad Request'):
|
|
|
|
return Response(response=json.dumps({'message': message}),
|
2015-06-11 17:59:40 +00:00
|
|
|
status=400,
|
|
|
|
mimetype="application/json")
|
|
|
|
|
|
|
|
|
2015-06-11 19:46:18 +00:00
|
|
|
def forbidden(message='Forbidden'):
|
|
|
|
return Response(response=json.dumps({'message': message}),
|
2015-06-11 17:59:40 +00:00
|
|
|
status=403,
|
|
|
|
mimetype="application/json")
|