Remove unused modules.
This commit is contained in:
@@ -1,31 +1,23 @@
|
||||
import os
|
||||
import logging
|
||||
import sys
|
||||
|
||||
from flask import Flask
|
||||
from flask_bootstrap import Bootstrap
|
||||
|
||||
|
||||
from estusshots.config import config
|
||||
|
||||
|
||||
def create_app():
|
||||
app = Flask(__name__)
|
||||
Bootstrap(app)
|
||||
return app
|
||||
|
||||
|
||||
if not config.SECRET_KEY:
|
||||
logging.error(
|
||||
"No secret key provided for app. Are the environment variables set correctly?"
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
app = create_app()
|
||||
app.config.from_pyfile("config/default.py")
|
||||
config_path = f"config/{app.env}.py"
|
||||
app.config.from_pyfile(config_path, silent=True)
|
||||
|
||||
logging.basicConfig(filename=config.LOG_PATH, level=logging.DEBUG)
|
||||
logging.basicConfig(filename=app.config.get("LOG_PATH"), level=logging.DEBUG)
|
||||
logging.info(f"Starting in working dir: {os.getcwd()}")
|
||||
app.config.from_object(config)
|
||||
|
||||
import estusshots.views.drinks
|
||||
import estusshots.views.enemies
|
||||
|
||||
Reference in New Issue
Block a user