From a0fd0faa572f9e8b944864f4c5ed91aded1b036c Mon Sep 17 00:00:00 2001 From: Gregory Trullemans Date: Mon, 1 May 2023 17:07:50 +0200 Subject: [PATCH] [WIP] Road to combination feature --- README.md | 6 +- jarvis/core/templates/base.html | 18 ++- .../followup/templates/routinedone/list.html | 2 +- jarvis/objective/admin.py | 5 +- .../migrations/0016_routine_is_routine.py | 18 +++ jarvis/objective/models.py | 1 + .../{routines => combinations}/compose.html | 8 +- .../{routines => combinations}/create.html | 2 +- .../{routines => combinations}/details.html | 4 +- .../{routines => combinations}/list.html | 10 +- jarvis/objective/tests_urls.py | 48 ++++-- jarvis/objective/urls.py | 68 +++++--- jarvis/objective/views.py | 150 +++++++++++++++--- .../tabs/tab_routines_and_routine_stats.html | 2 +- jarvis/tools/templatetags/submenuitems.py | 19 +++ 15 files changed, 278 insertions(+), 83 deletions(-) create mode 100644 jarvis/objective/migrations/0016_routine_is_routine.py rename jarvis/objective/templates/{routines => combinations}/compose.html (95%) rename jarvis/objective/templates/{routines => combinations}/create.html (93%) rename jarvis/objective/templates/{routines => combinations}/details.html (95%) rename jarvis/objective/templates/{routines => combinations}/list.html (88%) create mode 100644 jarvis/tools/templatetags/submenuitems.py diff --git a/README.md b/README.md index ae0bfdf..566590c 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ services: ### Installation de weasyprint En plus du `pip install weasyprint` et `pip install django-weasyprint`, il faut installer weasyprint (via homebrew, …) puis, **pour les mac M1** exécuter les commandes : -``` +```bash sudo ln -s /opt/homebrew/opt/glib/lib/libgobject-2.0.0.dylib /usr/local/lib/gobject-2.0 sudo ln -s /opt/homebrew/opt/pango/lib/libpango-1.0.dylib /usr/local/lib/pango-1.0 sudo ln -s /opt/homebrew/opt/harfbuzz/lib/libharfbuzz.dylib /usr/local/lib/harfbuzz @@ -71,12 +71,12 @@ Pour transferer des données d'un site à un autre, le plus simple est d'utilise Pour ne pas récupérer les user, les authorisation et les content-type, utilisez la commande : -``` +```bash python manage.py dumpdata --natural-foreign --exclude contenttypes --exclude auth.permission --exclude admin.logentry --exclude sessions.session --indent 4 > save.json ``` Pour charger les données, tapez ensuite : -``` +```bash python manage.py loaddata save.json ``` ## Applications diff --git a/jarvis/core/templates/base.html b/jarvis/core/templates/base.html index 7e147f9..12f563b 100644 --- a/jarvis/core/templates/base.html +++ b/jarvis/core/templates/base.html @@ -1,5 +1,6 @@ {% load static %} {% load menuitems %} +{% load submenuitems %} {% load has_group %} @@ -75,8 +76,21 @@