Project structure

Version 6 (Paul Carensac, 08/08/2016 04:31 pm)

1 1 Paul Carensac
h1. Project structure
2 2 Paul Carensac
3 2 Paul Carensac
4 2 Paul Carensac
Schemas and descriptions of the project's architecture.
5 2 Paul Carensac
6 2 Paul Carensac
7 2 Paul Carensac
{{>toc}}
8 2 Paul Carensac
9 2 Paul Carensac
---
10 2 Paul Carensac
11 2 Paul Carensac
h2. %{margin-left:0px; font-weight:bold; font-size:25px;  display:block; color:red;}Pyros Workflow%
12 2 Paul Carensac
13 5 Paul Carensac
14 4 Paul Carensac
{{thumbnail(pyros_design_en.png, size=3000, title=Pyros workflow)}}
15 1 Paul Carensac
16 3 Paul Carensac
17 3 Paul Carensac
---
18 2 Paul Carensac
19 2 Paul Carensac
h2. %{margin-left:0px; font-weight:bold; font-size:25px;  display:block; color:red;}Folders architecture%
20 2 Paul Carensac
21 2 Paul Carensac
22 5 Paul Carensac
{{thumbnail(folders_architecture.png , size=3000, title=Pyros workflow)}}
23 5 Paul Carensac
24 5 Paul Carensac
25 2 Paul Carensac
---
26 2 Paul Carensac
27 2 Paul Carensac
h2. %{margin-left:0px; font-weight:bold; font-size:25px;  display:block; color:red;}Applications architecture%
28 5 Paul Carensac
29 1 Paul Carensac
30 6 Paul Carensac
{{thumbnail(applications_architecture.png , size=3000, title=Application architecture)}}
31 6 Paul Carensac
32 6 Paul Carensac
33 6 Paul Carensac
Django applications are created with the command :
34 6 Paul Carensac
<pre>
35 6 Paul Carensac
$ python manage.py startapp AppName
36 6 Paul Carensac
</pre>
37 6 Paul Carensac
38 6 Paul Carensac
This commands automatically create some files and folders :
39 6 Paul Carensac
40 6 Paul Carensac
 * migrations : A folder containing the DB modifications files (only used in the pyrosapp application)
41 6 Paul Carensac
 * templates : A folder containing the Django HTML templates for this application
42 6 Paul Carensac
 * __init__.py & apps.py : App configuration files (not used)
43 6 Paul Carensac
 * models.py & admin.py : Files desribing database objects, and their representation in the admin interface (only used in pyrosapp)
44 6 Paul Carensac
 * views.py : File containing the code called for each web page
45 6 Paul Carensac
46 6 Paul Carensac
We added some other files to every application :
47 6 Paul Carensac
48 6 Paul Carensac
 * urls.py : File describing the routing from urls to views. Directly linked to (and called by) the "pyros" folder's urls.py.
49 6 Paul Carensac
 * tasks.py : File containing the Celery tasks for this application.