Answer the question
In order to leave comments, you need to log in
Why change config in flask when you can just write the path right away?
DATABASE = '/tmp/flsite.db'
DEBUG = True
SECRET_KEY = 'fsdfafxf34gfdgsf>dsa,faff'
app = Flask(__name__)
app.config.from_object(__name__)
app.config.update(dict(DATABASE=os.path.join(app.root_path, 'flsite')))
Answer the question
In order to leave comments, you need to log in
Why write what is tmp in this case? It seems that just the path should be written, I don’t have a tmp folder in the project, why is it?
app.root_path changes the path to the working directory, as I understand it, but why is this needed if you can immediately register it in DATABASE?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question