mashaelalbu commited on
Commit
ec2c5f3
·
verified ·
1 Parent(s): 656a46c

Update init file

Browse files
Files changed (1) hide show
  1. app/__init__.py +15 -9
app/__init__.py CHANGED
@@ -1,9 +1,15 @@
1
- from flask import Flask
2
-
3
- def create_app():
4
- app = Flask(__name__)
5
-
6
- from app.routes import main
7
- app.register_blueprint(main)
8
-
9
- return app
 
 
 
 
 
 
 
1
+ from flask import Flask
2
+ import os
3
+
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