|
@ -17,10 +17,10 @@ login_manager = LoginManager() |
|
|
def create_app(): |
|
|
def create_app(): |
|
|
APP = Flask(__name__, static_folder="static") |
|
|
APP = Flask(__name__, static_folder="static") |
|
|
|
|
|
|
|
|
APP.secret_key = 'secret-key' |
|
|
APP.secret_key = "secret-key" |
|
|
APP.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///data/distribusiverse.db" |
|
|
APP.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///data/distribusiverse.db" |
|
|
APP.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True |
|
|
APP.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = True |
|
|
#APP.config['MAX_CONTENT_LENGTH'] = 150 * 1024 * 1024 |
|
|
APP.config["MAX_CONTENT_LENGTH"] = 150 * 1024 * 1024 |
|
|
|
|
|
|
|
|
login_manager.session_protection = "strong" |
|
|
login_manager.session_protection = "strong" |
|
|
login_manager.login_view = "index" |
|
|
login_manager.login_view = "index" |
|
@ -28,8 +28,8 @@ def create_app(): |
|
|
|
|
|
|
|
|
csrf = CSRFProtect() |
|
|
csrf = CSRFProtect() |
|
|
|
|
|
|
|
|
APP.config['SECRET_KEY'] = os.urandom(24) |
|
|
APP.config["SECRET_KEY"] = os.urandom(24) |
|
|
APP.config['UPLOAD_FOLDER'] = 'tmpupload' |
|
|
APP.config["UPLOAD_FOLDER"] = "tmpupload" |
|
|
|
|
|
|
|
|
csrf.init_app(APP) |
|
|
csrf.init_app(APP) |
|
|
login_manager.init_app(APP) |
|
|
login_manager.init_app(APP) |
|
|