mashaelalbu commited on
Commit
4e0c1bc
·
verified ·
1 Parent(s): 7a45448

Update app/__init__.py

Browse files
Files changed (1) hide show
  1. app/__init__.py +7 -2
app/__init__.py CHANGED
@@ -4,12 +4,17 @@ import os
4
  def create_app():
5
  app = Flask(__name__)
6
 
7
-
8
  app.config.from_object('app.config.Config')
9
 
10
  os.makedirs(app.config['UPLOAD_FOLDER'], exist_ok=True)
11
 
 
12
  from app.routes import main
13
  app.register_blueprint(main)
14
 
15
- return app
 
 
 
 
 
 
4
  def create_app():
5
  app = Flask(__name__)
6
 
 
7
  app.config.from_object('app.config.Config')
8
 
9
  os.makedirs(app.config['UPLOAD_FOLDER'], exist_ok=True)
10
 
11
+ # تسجيل البلوبرينت
12
  from app.routes import main
13
  app.register_blueprint(main)
14
 
15
+ # تهيئة محلل الحساسيات عند إنشاء التطبيق
16
+ with app.app_context():
17
+ from app.routes import init_allergy_analyzer
18
+ init_allergy_analyzer(app)
19
+
20
+ return app