from flask import Flask
from flask import request
from flask import redirect
from flask import render_template
from flask import jsonify,current_app
from flask import send_from_directory
#from flask_cors import CORS
from functools import wraps
app = Flask(__name__)
#CORS(app)
def support_jsonp(func):
"""Wraps JSONified output for JSONP requests."""
@wraps(func)
def decorated_function(*args, **kwargs):
callback = request.args.get('callback', False)
if callback:
resp = func(*args, **kwargs)
resp.set_data('{}({})'.format(
str(callback),
resp.get_data(as_text=True)
))
resp.mimetype = 'application/javascript'
return resp
else:
return func(*args, **kwargs)
return decorated_function
@app.route('/')
def hello_world():
#return w
return '
' \
'