rastof9 commited on
Commit
0d7ec51
·
verified ·
1 Parent(s): ec12838

Update app/__init__.py

Browse files
Files changed (1) hide show
  1. app/__init__.py +9 -2
app/__init__.py CHANGED
@@ -10,9 +10,16 @@ celery = Celery(__name__)
10
  cache = redis.Redis()
11
 
12
  def create_app():
13
- app = Flask(__name__, instance_path=app.config['INSTANCE_PATH'])
 
 
 
14
  app.config.from_object('config.Config')
15
-
 
 
 
 
16
  db.init_app(app)
17
  login.init_app(app)
18
  celery.conf.update(app.config)
 
10
  cache = redis.Redis()
11
 
12
  def create_app():
13
+ # Create the Flask app first
14
+ app = Flask(__name__)
15
+
16
+ # Load configuration
17
  app.config.from_object('config.Config')
18
+
19
+ # Set the instance path after loading the config
20
+ app.instance_path = app.config['INSTANCE_PATH']
21
+
22
+ # Initialize extensions
23
  db.init_app(app)
24
  login.init_app(app)
25
  celery.conf.update(app.config)