Skip to content

Commit 1f1e2d9

Browse files
author
Sakti Dwi Cahyono
committed
import config first on __init__.py
1 parent 0151dc1 commit 1f1e2d9

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

users/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
from users.database import db, migrate
1515

1616

17+
APP = Flask(__name__)
18+
# Load configuration from any possible means.
19+
AppConfig(APP, default_settings="users.default_config")
20+
21+
1722
def add_handler_once(logger, handler):
1823
"""A helper to add a handler to a logger, ensuring there are no duplicates.
1924
@@ -68,10 +73,6 @@ def setup_logger():
6873
setup_logger()
6974
LOGGER = logging.getLogger('user_map')
7075

71-
APP = Flask(__name__)
72-
73-
# Load configuration from any possible means.
74-
AppConfig(APP, default_settings="users.default_config")
7576

7677
# Mailer
7778
mail = Mail(APP)

0 commit comments

Comments
 (0)