You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/structure.rst
+34-3Lines changed: 34 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,40 @@ You have a project with this structure:
11
11
├ config.py
12
12
├ views
13
13
│ ├ __init__.py
14
-
│ └ views.py
14
+
│ ├ views.py
15
+
│ └ healthcheck.py
15
16
├ models
16
17
│ ├ __init__.py
17
18
│ └ models.py
18
-
└ models
19
-
└ test_views.py
19
+
└ tests
20
+
└ test_views.py
21
+
22
+
manager.py
23
+
----------
24
+
25
+
A Django style command line. Use this to start the application like:
26
+
27
+
.. code-block:: bash
28
+
python manage.py runserver
29
+
30
+
You can set the host and the port with:
31
+
32
+
.. code-block:: bash
33
+
python manage.py runserver -h 0.0.0.0 -p 8080
34
+
35
+
project/__init__.py
36
+
-------------------
37
+
This file init the project with the funcion `create_app`. Initialize the Flask app, register `blueprints <http://flask.pocoo.org/docs/0.12/blueprints/>`_
38
+
and intialize all libraries like Swagger, database, the trace system...
39
+
40
+
project/config.py
41
+
-----------------
42
+
See :doc:`configuration </configuration>` section
43
+
44
+
project/views
45
+
-------------
46
+
use views.py or create your file. You must add after register the view blueprint in `project/views/__init__.py`.
47
+
48
+
project/views/healthcheck.py
49
+
----------------------------
50
+
This views is usually used by Kubernetes, Eureka and other systems to check if our application is up and running
0 commit comments