From b23d3ed0aabb9b6f22ead7279fc50eb794661449 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 01:01:26 +0000 Subject: [PATCH 1/5] Bump pillow from 9.3.0 to 10.0.1 Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.3.0 to 10.0.1. - [Release notes](https://github.com/python-pillow/Pillow/releases) - [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst) - [Commits](https://github.com/python-pillow/Pillow/compare/9.3.0...10.0.1) --- updated-dependencies: - dependency-name: pillow dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index baa96e1..c41fbf2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ Django==3.1.14 django-appconf==1.0.4 django-imagekit==4.0.2 pilkit==2.0 -Pillow==9.3.0 +Pillow==10.0.1 pytz==2019.3 six==1.13.0 sqlparse==0.4.4 From 74412a3a48a7bbcc85943ce8c25bb0b7f89d516d Mon Sep 17 00:00:00 2001 From: CelestinHuet Date: Tue, 24 Oct 2023 09:43:30 +0200 Subject: [PATCH 2/5] =?UTF-8?q?Ajout=20dans=20les=20=C3=A9tats=20possibles?= =?UTF-8?q?=20de=20l'orgue=20:=20'Disparu',=20affichage=20de=20'Orgue=20di?= =?UTF-8?q?sparu'=20dans=20l'en-t=C3=AAte=20de=20la=20fiche=20de=20l'orgue?= =?UTF-8?q?,=20affichage=20de=20'Orgue=20disparu'=20dans=20la=20liste=20de?= =?UTF-8?q?s=20orgues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- orgues/models.py | 3 ++- orgues/templates/orgues/base_edition.html | 5 ++++- orgues/templates/orgues/orgue_detail.html | 5 ++++- orgues/templates/orgues/orgue_list.html | 1 + 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/orgues/models.py b/orgues/models.py index 196e450..5966e52 100644 --- a/orgues/models.py +++ b/orgues/models.py @@ -61,7 +61,8 @@ class Orgue(models.Model): ('bon', "Bon : jouable, défauts mineurs"), ('altere', "Altéré : difficilement jouable"), ('degrade', "Dégradé ou en ruine : injouable"), - ('restauration', "En restauration (ou projet initié)") + ('restauration', "En restauration (ou projet initié)"), + ('disparu', 'Disparu') ) CHOIX_QUALIFICATION_PALISSY = ( diff --git a/orgues/templates/orgues/base_edition.html b/orgues/templates/orgues/base_edition.html index 000f9b7..07f376a 100644 --- a/orgues/templates/orgues/base_edition.html +++ b/orgues/templates/orgues/base_edition.html @@ -23,7 +23,10 @@

- {{ orgue.edifice|capfirst }}
+ {{ orgue.edifice|capfirst }} + {% if orgue.etat == "disparu" %} + (Orgue disparu) + {% endif %}

{{ orgue.commune }}{% if orgue.ancienne_commune %} ({{ orgue.ancienne_commune }}){% endif %}, {{ orgue.departement }} diff --git a/orgues/templates/orgues/orgue_detail.html b/orgues/templates/orgues/orgue_detail.html index 94c40e7..e54b209 100644 --- a/orgues/templates/orgues/orgue_detail.html +++ b/orgues/templates/orgues/orgue_detail.html @@ -35,7 +35,10 @@

- {{ orgue.edifice|capfirst }}
+ {{ orgue.edifice|capfirst }} + {% if orgue.etat == "disparu" %} + (Orgue disparu) + {% endif %}

{% spaceless %} diff --git a/orgues/templates/orgues/orgue_list.html b/orgues/templates/orgues/orgue_list.html index f34defc..5b08f12 100644 --- a/orgues/templates/orgues/orgue_list.html +++ b/orgues/templates/orgues/orgue_list.html @@ -99,6 +99,7 @@

Orgue , ((orgue.emplacement)) , ((orgue.resume_composition)) + , Orgue disparu

{% endspaceless %}
From c593c8d8978d246ce0bc103ee53b8f65c9a7ed06 Mon Sep 17 00:00:00 2001 From: CelestinHuet Date: Tue, 24 Oct 2023 10:03:52 +0200 Subject: [PATCH 3/5] =?UTF-8?q?Mise=20=C3=A0=20jour=20des=20statistiques?= =?UTF-8?q?=20de=20la=20page=20d'accueil=20pour=20tenir=20compte=20des=20o?= =?UTF-8?q?rgues=20disparus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- orgues/views.py | 3 ++- templates/accueil.html | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/orgues/views.py b/orgues/views.py index 7585428..e94418b 100644 --- a/orgues/views.py +++ b/orgues/views.py @@ -1456,7 +1456,7 @@ def calc(self, df, type): return dict((k, self.normalize(v)) for k, v in res.items()) def normalize(self, data): - total = data['count'] or 0 + total = data['count'] - data['disparu'] or 0 return { 'total': total, 'mh': data['mh'] or 0, @@ -1466,4 +1466,5 @@ def normalize(self, data): 'degrade': round(100 * ((data['degrade'] or 0) + (data['restauration'] or 0)) / total, 0), 'inconnu': round( 100 * (total - (data['altere'] or 0) - (data['bon'] or 0) - (data['tres_bon'] or 0) - (data['degrade'] or 0) - (data['restauration'] or 0)) / total, 0), + 'disparu' : data['disparu'], } diff --git a/templates/accueil.html b/templates/accueil.html index d28933b..d1c28fa 100644 --- a/templates/accueil.html +++ b/templates/accueil.html @@ -351,12 +351,16 @@

Carte

((selected))

((data.total)) - Nombre d'orgues recensés + Nombre d'orgues existants recensés

((data.mh)) Orgues inscrits ou classés +

+

+ ((data.disparu)) + Nombre d'orgues disparus


From 087437c333a48d91873bf2bb6982be16c89368ac Mon Sep 17 00:00:00 2001 From: CelestinHuet Date: Wed, 25 Oct 2023 10:29:14 +0200 Subject: [PATCH 4/5] Affichage de 'orgue disparu' dans la liste de orgues avec Meilisearch --- orgues/management/commands/build_meilisearch_index.py | 1 + 1 file changed, 1 insertion(+) diff --git a/orgues/management/commands/build_meilisearch_index.py b/orgues/management/commands/build_meilisearch_index.py index 074b7e7..ea0c42b 100644 --- a/orgues/management/commands/build_meilisearch_index.py +++ b/orgues/management/commands/build_meilisearch_index.py @@ -74,6 +74,7 @@ def handle(self, *args, **options): 'longitude', 'construction', 'modified_date', + 'etat', ]) index.update_ranking_rules([ From 232361cc10a9a3abc913bb95d5f4f2d98ae293ba Mon Sep 17 00:00:00 2001 From: CelestinHuet Date: Wed, 25 Oct 2023 10:32:54 +0200 Subject: [PATCH 5/5] Ajout de la mention orgue disparu sur la carte --- orgues/templates/orgues/carte_popup.html | 1 + 1 file changed, 1 insertion(+) diff --git a/orgues/templates/orgues/carte_popup.html b/orgues/templates/orgues/carte_popup.html index c7507ea..f328920 100644 --- a/orgues/templates/orgues/carte_popup.html +++ b/orgues/templates/orgues/carte_popup.html @@ -22,6 +22,7 @@

{{ edifice }}

{% if orgue.designation %}{{ orgue.designation }} {% else %} Orgue {% endif %} {% if orgue.emplacement %}, {{ orgue.emplacement }} {% endif %} {% if orgue.resume_composition %}, {{ orgue.resume_composition }} {% endif %} + {% if orgue.etat == "disparu" %}, Orgue disparu {% endif %}
Localisation: {{ orgue.edifice }}, {{ orgue.commune }}, {{ orgue.departement }} ({{ orgue.region }})
Facteurs: {% for evenement in orgue.evenements.all %}{% for facteur in evenement.facteurs.all %}{{ facteur.nom }}, {% endfor %}{% endfor %}