Reread Django part 1
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
Fred Pauchet 2020-12-15 21:37:26 +01:00
parent b98cc1ef3b
commit 2cc3c152bd
5 changed files with 28 additions and 28 deletions

View File

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -138,14 +138,9 @@ Tant que nous y sommes, nous pouvons ajouter un répertoire dans lequel nous sto
[source,bash]
----
$ mkdir requirements
$ touch README.md
----
[source,bash]
----
(gwift) fred@aerys:~/Sources$ tree gwift
(gwift) $ mkdir requirements
(gwift) $ touch README.md
(gwift) $ tree gwift
gwift
├── gwift
│   ├── asgi.py
@ -198,7 +193,7 @@ Nous faisons ici une distinction entre un **projet** et une **application**:
Pour `gwift`, nous aurons:
.Django Projet vs Applications
image:images/django/django-project-vs-applications.png[]
image::images/django/django-project-vs-apps-gwift.png[]
. une première application pour la gestion des listes de souhaits et des éléments,
. une deuxième application pour la gestion des utilisateurs,
@ -206,6 +201,11 @@ image:images/django/django-project-vs-applications.png[]
Nous voyons également que la gestion des listes de souhaits et éléments aura besoin de la gestion des utilisateurs - elle n'est pas autonome -, tandis que la gestion des utilisateurs n'a aucune autre dépendance qu'elle-même.
Pour `khana`, nous aurons:
.Django Project vs Applications
image::images/django/django-project-vs-apps-khana.png[]
Nous pouvons clairement visualiser le principe de **contexte** pour une application: celle-ci viendra avec son modèle, ses tests, ses vues et son paramétrage.
Elle pourra éventuellement être réutilisée dans un autre projet.