Update app.py

This commit is contained in:
Andros Fenollosa 2018-02-12 22:39:12 +01:00 committed by GitHub
parent c791982256
commit bd66044206
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

6
app.py
View File

@ -17,8 +17,7 @@ from flask_marshmallow import Marshmallow
dotenv_path = join(dirname(__file__), 'env') dotenv_path = join(dirname(__file__), 'env')
load_dotenv(dotenv_path) load_dotenv(dotenv_path)
app = Flask(__name__) app = Flask(__name__)
ma = Marshmallow(app)
api = Api(app)
# ========================= # =========================
# Configurations # Configurations
@ -26,6 +25,9 @@ api = Api(app)
app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY') app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY')
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URI') app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URI')
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
ma = Marshmallow(app)
api = Api(app)
db.init_app(app) db.init_app(app)
PRE_URL = '/api/v1/' PRE_URL = '/api/v1/'