Compare commits

..

No commits in common. "9e48953fc3d10d4923dd0406f21dc1180c5e3326" and "d96dfa8800737064e5a16f4b065f7d7e6be1eaf4" have entirely different histories.

3 changed files with 3 additions and 14 deletions

View File

@ -21,6 +21,7 @@ rm data/ki.sqlite
cp env.dev .env
pipenv install --dev
pipenv shell
export FLASK_APP=app.py
flask db upgrade
flask seed
flask run

10
app.py
View File

@ -1,4 +1,3 @@
import logging
import os
from dotenv import load_dotenv, find_dotenv
@ -8,14 +7,9 @@ from flask_migrate import Migrate
load_dotenv(find_dotenv())
loglevel = os.getenv("KI_LOGLEVEL", logging.WARNING)
loglevel = int(loglevel)
logging.basicConfig(level=loglevel)
logging.debug("Hello from KI")
app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = os.getenv("SQLALCHEMY_DATABASE_URI")
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv("SQLALCHEMY_DATABASE_URI")
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config["KI_DATA_DIR"] = os.path.dirname(__file__) + "/data"
app.config["KI_AUTH"] = os.getenv("KI_AUTH")
db = SQLAlchemy(app)

View File

@ -1,9 +1,3 @@
SQLALCHEMY_DATABASE_URI = 'sqlite:///data/ki.sqlite'
FLASK_APP=app.py
FLASK_ENV=development
KI_AUTH=file
# 10 = debug
KI_LOGLEVEL=10