Fix config problem with gunicorn
* the `__name__` variable is not `__main__` when the app is opened with gunicorn.
This commit is contained in:
@@ -17,7 +17,7 @@ def load_config():
|
|||||||
))
|
))
|
||||||
app.config.from_envvar('CARDS_SETTINGS', silent=True)
|
app.config.from_envvar('CARDS_SETTINGS', silent=True)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__" or __name__ == "flash_cards":
|
||||||
load_config()
|
load_config()
|
||||||
|
|
||||||
def connect_db():
|
def connect_db():
|
||||||
|
|||||||
Reference in New Issue
Block a user