Refactoring MySQL
This commit is contained in:
@ -3,7 +3,7 @@ import sys
|
||||
|
||||
|
||||
# noinspection PyPackageRequirements
|
||||
def get_mysql():
|
||||
def getMySQL():
|
||||
"""
|
||||
Extrahiert die MySQL-Anmeldedaten aus ~/.my.cnf . \n
|
||||
Funktioniert wahrscheinlich nur auf Linux, vor allem für den Server gedacht.
|
||||
|
||||
6
init.py
6
init.py
@ -4,7 +4,7 @@ from flask_sqlalchemy import SQLAlchemy
|
||||
from flask_talisman import Talisman
|
||||
from sqlalchemy import ForeignKey
|
||||
|
||||
from getMySQL import get_mysql
|
||||
from getMySQL import getMySQL
|
||||
import atexit
|
||||
from flask_apscheduler import APScheduler
|
||||
|
||||
@ -15,8 +15,8 @@ def create(testing: bool = False):
|
||||
:return app:
|
||||
"""
|
||||
app = Flask(__name__)
|
||||
dbpw = get_mysql()[1]
|
||||
dbun = get_mysql()[0]
|
||||
dbpw = getMySQL()[1]
|
||||
dbun = getMySQL()[0]
|
||||
|
||||
app.config['SECRET_KEY'] = 'SECRET_KEY_GOES_HERE'
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://' + dbun + ':' + dbpw + '@localhost/paulmrtn_DUALHUB'
|
||||
|
||||
Reference in New Issue
Block a user