0
What does " test_config=None" mean in a flask app ?
What does " test_config=None" mean in a flask app ? I read the flask documentation but i really didn't understand Here's an example code: import os from flask import Flask def create_app(test_config=None): app = Flask (__name__) return app
3 odpowiedzi
+ 3
In this example it does nothing, the function just takes that argument but doesn't use it, you can call it whatever you want.
Link the part of the documentation where you read this and I'll analyze it
0
Bagon Thanks for replying,
I mean what does it do in general ? It's usage ?
Here's the documentation
https://flask.palletsprojects.com/en/1.1.x/tutorial/factory/
0
Marina Khamis you can load a configuration file and override some default keys, not that useful for small projects but might be handy in large ones