This repository was archived by the owner on May 26, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44This is the principal module of the project_name project.
55here you put your main classes and objects.
66
7- Example:
8-
9- Create here your Flask application to be imported and
10- executed by the __main__ module.
11-
12- add "flask" to the install_requires list on setup.py
13-
14- run `make install` to install the project_name application.
15-
16- Create a Flask factory here on this file:
17-
18- from flask import Flask
19-
20- def create_app():
21- app = Flask(__name__)
22-
23- @app.route('/')
24- def index():
25- return 'Hello World from project_name!'
26-
27- return app
28-
29- Go to __main__.py and change the code inside the main function.
7+ Be creative! do whatever you want!
308
31- from .base import create_app
9+ If you want to replace this with a Flask application run:
3210
33- def main():
34- app = create_app()
35- app.run()
11+ $ make init
3612
37- Be creative! do whatever you want!
13+ and then choose `flask` as template.
3814"""
3915
4016
@@ -54,17 +30,3 @@ def base_function() -> str:
5430 Base function.
5531 """
5632 return "hello from base function"
57-
58-
59- # uncomment if you are creating a Flask application
60- # from flask import Flask
61-
62-
63- # def create_app():
64- # app = Flask(__name__)
65-
66- # @app.route('/')
67- # def index():
68- # return 'Hello World from project_name!'
69-
70- # return app
You can’t perform that action at this time.
0 commit comments