I'm currently working on a flask app (package) and calling my config settings from an object and have set the Debug setting to 'True'. I'm using windows and have set my Flask Environment variable as follows:
set FLASK_APP=flasktest.py
but when i execute 'flask run' from the command line, It doesn't not turn on the debugger for my app. I know that I can set 'FLASK_ENV=development' or 'DEBUG=1'. But shouldn't this be picked up from my config settings?
when running my flask app through python, it does enable the debugger ie.
python flasktest.py
but what I would like to know is why this doesn't work when using 'flask run'?
config.py
class Config(object):
DEBUG = True
TESTING = False
SECRET_KEY = 'supersecret'
UPLOAD_FOLDER = 'uploads/'
ALLOWED_EXTENSIONS = set(['csv','xls','xslx'])
__init__.py
from flask import Flask
from config import Config
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_login import LoginManager
app = Flask(__name__)
app.config.from_object(Config)
db = SQLAlchemy(app)
migrate = Migrate(app, db)
login = LoginManager(app)
login.login_view = 'login'
from application import routes, models