Server Config
This commit is contained in:
@ -1 +1 @@
|
||||
25454
|
||||
18291
|
||||
|
||||
6
init.py
6
init.py
@ -3,6 +3,7 @@ from flask_login import LoginManager, UserMixin
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
from flask_talisman import Talisman
|
||||
from sqlalchemy import ForeignKey
|
||||
import sys
|
||||
|
||||
from getMySQL import getMySQL
|
||||
import atexit
|
||||
@ -18,7 +19,10 @@ def create(testing: bool = False):
|
||||
dbpw = getMySQL()[1]
|
||||
dbun = getMySQL()[0]
|
||||
|
||||
app.config['SECRET_KEY'] = 'SECRET_KEY_GOES_HERE'
|
||||
try:
|
||||
app.config['SECRET_KEY'] = sys.argv[1] # Den Secret Key bei Start mitgeben: routing.py SECRET_KEY_GOES HERE
|
||||
except IndexError:
|
||||
app.config['SECRET_KEY'] = "SECRET-KEY-GOES-HERE"
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://' + dbun + ':' + dbpw + '@localhost/paulmrtn_DUALHUB'
|
||||
db.init_app(app)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user