Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
api.py 872 Bytes
Copy Edit Web IDE Raw Blame History
Mendalas authored 2019-06-12 18:07 . new create
# coding:utf-8
from flask import send_file, send_from_directory
from flask import Flask, make_response, render_template, request
from flask_restful import reqparse, abort, Api, Resource
from flask_cors import CORS
import global_seting as gs
import os
app = Flask(__name__, static_url_path='')
cors = CORS(app, resources={r"/api/*": {"origins": "*"}})
restfulapi = Api(app)
root = os.path.join(os.path.dirname(os.path.abspath(__file__)), "/")
app.config['SECRET_KEY'] = 'the quick brown fox jumps over the lazy dog'
#办公室自己机器
app.config['SQLALCHEMY_DATABASE_URI'] = gs.getMysqlURI()
#办公室公用机
#app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://sm:senmou123@'+gs.getIp()+'/ls_sys?charset=utf8'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True
app.config['SQLALCHEMY_COMMIT_ON_TEARDOWN'] = True
# app.config['SQLALCHEMY_ECHO'] = True

Comment ( 0 )

Sign in for post a comment