From 68361ac92b06039de906749ff9241a081eaebaf3 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Fri, 30 Aug 2024 14:17:42 +0200 Subject: [PATCH] Delete modal for delete object --- archive.py | 1 - db.py | 1 - templates/object.html | 36 ++++++++++++++++++++++++++++++------ 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/archive.py b/archive.py index a3377d8..28ac5ec 100644 --- a/archive.py +++ b/archive.py @@ -382,7 +382,6 @@ class ZipSender(ArchiveSender): current_byte += len(bytes) yield bytes - time.sleep(1) central_directory_size = 0 centra_directory_offset = current_byte diff --git a/db.py b/db.py index e29a497..c79c9f8 100755 --- a/db.py +++ b/db.py @@ -244,7 +244,6 @@ class Object: def all_by_project(db: sqlite3.Connection) -> list[Project]: objects = [x.full(db) for x in Object.all(db)] objects_by_projects = itertools.groupby(objects, lambda x: x.project) - # print(dict(objects_by_projects)) return list(map(lambda x: Project(x[0], list(x[1])), objects_by_projects)) def add_acquisition(self, calibration_id: int, db: sqlite3.Connection) -> Acquisition: diff --git a/templates/object.html b/templates/object.html index b64936a..e3fc765 100644 --- a/templates/object.html +++ b/templates/object.html @@ -42,7 +42,7 @@ {% endif %}
- Supprimer cet objet + Supprimer cet objet
@@ -64,25 +64,49 @@ {% endif %} + {% endblock content %} {% block extrajs %}{% if calibration.state < CalibrationState.IsValidated %} {% endif %}{% endblock %}