Mohammed Foud
commited on
Commit
·
c353180
1
Parent(s):
ac6689f
Add application file
Browse files- app.py +9 -3
- etc/app.py +0 -18
app.py
CHANGED
@@ -3,6 +3,12 @@ from config import Config
|
|
3 |
from routes.api import api_bp
|
4 |
from routes.views import views_bp
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
def create_app():
|
7 |
app = Flask(__name__)
|
8 |
app.config.from_object(Config)
|
@@ -13,6 +19,6 @@ def create_app():
|
|
13 |
|
14 |
return app
|
15 |
|
16 |
-
if __name__ == '__main__':
|
17 |
-
|
18 |
-
|
|
|
3 |
from routes.api import api_bp
|
4 |
from routes.views import views_bp
|
5 |
|
6 |
+
app = Flask(__name__)
|
7 |
+
app.config.from_object(Config)
|
8 |
+
|
9 |
+
# Register blueprints
|
10 |
+
app.register_blueprint(views_bp)
|
11 |
+
app.register_blueprint(api_bp, url_prefix='/api')
|
12 |
def create_app():
|
13 |
app = Flask(__name__)
|
14 |
app.config.from_object(Config)
|
|
|
19 |
|
20 |
return app
|
21 |
|
22 |
+
# if __name__ == '__main__':
|
23 |
+
# app = create_app()
|
24 |
+
# app.run(debug=True)
|
etc/app.py
CHANGED
@@ -1,21 +1,3 @@
|
|
1 |
-
from flask import Flask
|
2 |
-
from config import Config
|
3 |
-
from routes.api import api_bp
|
4 |
-
from routes.views import views_bp
|
5 |
-
|
6 |
-
def create_app():
|
7 |
-
app = Flask(__name__)
|
8 |
-
app.config.from_object(Config)
|
9 |
-
|
10 |
-
# Register blueprints
|
11 |
-
app.register_blueprint(views_bp)
|
12 |
-
app.register_blueprint(api_bp, url_prefix='/api')
|
13 |
-
|
14 |
-
return app
|
15 |
-
|
16 |
-
if __name__ == '__main__':
|
17 |
-
app = create_app()
|
18 |
-
app.run(debug=True)
|
19 |
|
20 |
from flask import Flask, render_template, request, jsonify, send_from_directory, Response, copy_current_request_context
|
21 |
import g4f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
|
2 |
from flask import Flask, render_template, request, jsonify, send_from_directory, Response, copy_current_request_context
|
3 |
import g4f
|