diff --git a/source/images/diagrams/django-project-vs-apps-gwift.drawio b/source/images/diagrams/django-project-vs-apps-gwift.drawio new file mode 100644 index 0000000..f8ed4d8 --- /dev/null +++ b/source/images/diagrams/django-project-vs-apps-gwift.drawio @@ -0,0 +1 @@ +7VlLc5swEP41PtYDCDA+puTRQzuT1jN9HBVYQI1AjBC26a+vAGFgcJiE2g7J9GJrP61e++0uK1ggN97fcZxGX5gPdGFo/n6BrheGoWuOLf9KpKiRta2AkBNfKbXAhvyBZqRCc+JD1lMUjFFB0j7osSQBT/QwzDnb9dUCRvurpjiEAbDxMB2iP4gvohp1jFWLfwISRs3Kur2ue2LcKKuTZBH22a4DoZsFcjljom7FexdoabzGLvW42yd6DxvjkIjnDPha6Pp9ssmdza1jbXKXfze+fXDU3kTRHBh8eX4lMi4iFrIE05sW/diinxlLpZouwd8gRKHow7lgEopETFUv7In4Kdva0lLSr07PdektWiMUjZAIXnQGleKvbl87rJKacdkjCC9S03s534KvhKHFlBEzlnMPRszUeB7mIYgRPVTrlTbsLKD4uAMWg9ypVOBAsSDbvo9h5arhQa9lUzYUoS8gd/2f3FOSa86KXB1NYLdnMc7yxK+kgWX/yQuM87vB+ck25kW2OVeyV++BbF2fF9v1vFtMc7XS3Y4EYuACu4gI2KS4ssFO1l99knokt/yXUkAodRllvJoI+RicwCuHCM4eodNjew48BGMkbIEL2I9aTfVaqhBSlaCpxF1bVtmawqJOSWVrZzKzMTDzVZpS4kmGWVKWrFDWn5AdxEz+5oJQkmEBOc/OR0jgeOAdJeTBsUxrNComE6IfYURHl2SkKfovV7Gc4Fmlv0LJgt7kUwxNCTgZbaJqVL3SMhEm4pyhFwTG8dDz7Qfbsk8TeoY2u9hbzbXEmBajqxcF6fRQNJ8ZivO6GupTLv4zLigRcl5CdyXdAyfSmsAv5gMnT8fV0CvOcdFRSBlJ6gypZr4vgTb3mKbTyz1NHXD7hP7aHFOXjXoDrTMeTjLdP83Bo2K5XL71pI/mV3BNeUU046Rfvn3t3iyXawddNhXor/aCYVIusBDqB7czngtWxpj6eXKBPrwPH6kbPRbHeXIA3ZI/SZb8W7hocbX2IpyEwA91ZQxZhkN4B5e4yyUVKbbfK2p6268+6OYv \ No newline at end of file diff --git a/source/images/diagrams/django-project-vs-apps-khana.drawio b/source/images/diagrams/django-project-vs-apps-khana.drawio new file mode 100644 index 0000000..e0d5f09 --- /dev/null +++ b/source/images/diagrams/django-project-vs-apps-khana.drawio @@ -0,0 +1 @@ +7VlLc5swEP41PtYDCDA+puTRQzuT1jN9HBVYQI1AjBC26a+vAGFgcJiE2g7J9GJrP61e++0uK1ggN97fcZxGX5gPdGFo/n6BrheGoWuOLf9KpKiRta2AkBNfKbXAhvyBZqRCc+JD1lMUjFFB0j7osSQBT/QwzDnb9dUCRvurpjiEAbDxMB2iP4gvohp1jFWLfwISRs3Kur2ue2LcKKuTZBH22a4DoZsFcjljom7FexdoabzGLvW42yd6DxvjkIjnDPha6Pp9ssmdza1jbXKXfze+fXDU3kTRHBh8eX4lMi4iFrIE05sW/diinxlLpZouwd8gRKHow7lgEopETFUv7In4Kdva0lLSr07PdektWiMUjZAIXnQGleKvbl87rJKacdkjCC9S03s534KvhKHFlBEzlnMPRszUeB7mIYgRPVTrlTbsLKD4uAMWg9ypVOBAsSDbvo9h5arhQa9lUzYUoS8gd/2f3FOSa86KXB1NYLdnMc7yxK+kgWX/yQuM87vB+ck25kW2OVeyV++BbF2fF9v1vFtMc7XS3Y4EYuACu4gI2KS4ssFO1l99knokt/yXUkAodRllvJoI+RicwCuHCM4eodNjew48BGMkbIEL2I9aTfVaqhBSlaCpxF1bVtmawqJOSWVrZzKzMTDzVZpS4kmGWVKWrFDWn5AdxEz+5oJQkmEBOc/OR0jgeOAdJeTBsUxrNComE6IfYURHl2SkKfovV7Gc4Fmlv0LJgt7kUwxNCTgZbaJqVL3SMhEm4pyhFwTG8dDz7Qfbsk8TeoY2u9hbzbXEmBajqxcF6fRQNJ8ZivO6GupTLv4zLigRcl5CdyXdAyfSmsAv5gMnT8fV0CvOcdFRSBlJ6gypZr4vgTb3mKbTyz1NHXD7hP7aHFOXjXoDrTMeTjLdP83Bo2K5XL71pI/mV3BNeUU046Rfvn3t3iyXawddNhXor/aCYVIusBDqB7czngtWxpj6eXKBPrwPH6kbPRbHeXIA3ZI/SZb8W7hocbX2IpyEwA91ZQxZhkN4B5e4yyUVKbbfK2p6268+6OYv \ No newline at end of file diff --git a/source/images/django/django-project-vs-apps-gwift.png b/source/images/django/django-project-vs-apps-gwift.png index 961aacc..9da6ed0 100644 Binary files a/source/images/django/django-project-vs-apps-gwift.png and b/source/images/django/django-project-vs-apps-gwift.png differ diff --git a/source/images/django/django-project-vs-apps-khana.png b/source/images/django/django-project-vs-apps-khana.png index 961aacc..dc41f37 100644 Binary files a/source/images/django/django-project-vs-apps-khana.png and b/source/images/django/django-project-vs-apps-khana.png differ diff --git a/source/part-1-workspace/django/_index.adoc b/source/part-1-workspace/django/_index.adoc index dec4d59..fea149e 100644 --- a/source/part-1-workspace/django/_index.adoc +++ b/source/part-1-workspace/django/_index.adoc @@ -201,14 +201,14 @@ image::images/django/django-project-vs-apps-gwift.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: +Pour `khana`, nous pourrions avoir quelque chose comme ceci: .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. +En rouge, vous pouvez voir quelque chose que nous avons déjà vu: la gestion des utilisateurs et la possibilité qu'ils auront de communiquer entre eux. +Ceci pourrait être commun aux deux applications. +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 et pourrait ainsi être réutilisée dans un autre projet. C'est en ça que consistent les https://www.djangopackages.com/[paquets Django] déjà disponibles: ce sont "_simplement_" de petites applications empaquetées et pouvant être réutilisées dans différents contextes (eg. https://github.com/tomchristie/django-rest-framework[Django-Rest-Framework], https://github.com/django-debug-toolbar/django-debug-toolbar[Django-Debug-Toolbar], ...). @@ -256,7 +256,7 @@ Si nous nous rendons sur la page http://127.0.0.1:8000 (ou http://localhost:8000 image::images/django/manage-runserver.png[] IMPORTANT: Nous avons mis un morceau de la sortie console entre crochet `[...]` ci-dessus, car elle concerne les migrations. -_A priori_, vous avez également dû recevoir une insulte type `You have 18 unapplied migration(s). [...] Run 'python manage.py migrate' to apply them.` +Si vous avez suivi les étapes jusqu'ici, vous avez également dû voir un message type `You have 18 unapplied migration(s). [...] Run 'python manage.py migrate' to apply them.` Cela concerne les migrations, et c'est un point que nous verrons un peu plus tard.