Project structure

Version 9 (Paul Carensac, 08/08/2016 05:38 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 7 Paul Carensac
h2. %{margin-left:0px; font-weight:bold; font-size:25px;  display:block; color:red;}Pyros Design%
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 7 Paul Carensac
Each application is represented here, as well as the external agents.
17 7 Paul Carensac
We can see every interaction between the applications, with the main workflow in red.
18 3 Paul Carensac
19 8 Paul Carensac
All the applications are detailed [[Pyros_applications|here]].
20 8 Paul Carensac
21 3 Paul Carensac
---
22 2 Paul Carensac
23 2 Paul Carensac
h2. %{margin-left:0px; font-weight:bold; font-size:25px;  display:block; color:red;}Folders architecture%
24 2 Paul Carensac
25 2 Paul Carensac
26 5 Paul Carensac
{{thumbnail(folders_architecture.png , size=3000, title=Pyros workflow)}}
27 5 Paul Carensac
28 5 Paul Carensac
29 9 Paul Carensac
 * PYROS : Main folder of the project, root of the git repository
30 9 Paul Carensac
31 9 Paul Carensac
  * doc : Contains all the documentation
32 9 Paul Carensac
33 9 Paul Carensac
   * database : Contains the database files (schema, creation sql script)
34 9 Paul Carensac
   * uml : usecases and activities diagrams for the applications
35 9 Paul Carensac
   * diagrams : other useful diagrams
36 2 Paul Carensac
---
37 2 Paul Carensac
38 2 Paul Carensac
h2. %{margin-left:0px; font-weight:bold; font-size:25px;  display:block; color:red;}Applications architecture%
39 5 Paul Carensac
40 1 Paul Carensac
41 6 Paul Carensac
{{thumbnail(applications_architecture.png , size=3000, title=Application architecture)}}
42 6 Paul Carensac
43 6 Paul Carensac
44 6 Paul Carensac
Django applications are created with the command :
45 6 Paul Carensac
<pre>
46 6 Paul Carensac
$ python manage.py startapp AppName
47 6 Paul Carensac
</pre>
48 6 Paul Carensac
49 6 Paul Carensac
This commands automatically create some files and folders :
50 6 Paul Carensac
51 6 Paul Carensac
 * migrations : A folder containing the DB modifications files (only used in the pyrosapp application)
52 6 Paul Carensac
 * templates : A folder containing the Django HTML templates for this application
53 6 Paul Carensac
 * __init__.py & apps.py : App configuration files (not used)
54 6 Paul Carensac
 * models.py & admin.py : Files desribing database objects, and their representation in the admin interface (only used in pyrosapp)
55 6 Paul Carensac
 * views.py : File containing the code called for each web page
56 6 Paul Carensac
57 6 Paul Carensac
We added some other files to every application :
58 6 Paul Carensac
59 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.
60 6 Paul Carensac
 * tasks.py : File containing the Celery tasks for this application.