svitvojimilioni
590a43b28e
- config didn't work now it's working properly - it takes config from envirionment variable FLASK_CONFIG - if no such variable exists it uses Development config as default
16 lines
381 B
Python
16 lines
381 B
Python
from flask import Flask
|
|
from flask_sqlalchemy import SQLAlchemy
|
|
import os
|
|
|
|
app = Flask(__name__)
|
|
|
|
config_string = os.environ.get("FLASK_CONFIG", "config.DevelopmentConfig")
|
|
app.config.from_object("config.DevelopmentConifg")
|
|
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///app.db"
|
|
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
|
|
|
|
db = SQLAlchemy(app)
|
|
|
|
from . import routes
|
|
|