From 397bdd12b439961d676f0d3ced2555b31d7295cd Mon Sep 17 00:00:00 2001 From: Anh-Thy04 Date: Thu, 19 Jun 2025 21:19:38 +0200 Subject: [PATCH] extra changes frontend --- application/__init__.py | 9 +- application/dashboard/templates/add.html | 40 +++++++ .../dashboard/templates/dashboard.html | 9 +- application/dashboard/templates/edit.html | 110 ------------------ 4 files changed, 52 insertions(+), 116 deletions(-) delete mode 100644 application/dashboard/templates/edit.html diff --git a/application/__init__.py b/application/__init__.py index 2711775..3ca835a 100644 --- a/application/__init__.py +++ b/application/__init__.py @@ -6,11 +6,12 @@ from io import BytesIO from ultralytics import YOLO import easyocr -# ANPR shiz -car_model = YOLO("yolov8n.pt") -plate_model = YOLO("license_plate_detector.pt") -ocr_reader = easyocr.Reader(["nl"]) +# ANPR +if True: + car_model = YOLO("yolov8n.pt") + plate_model = YOLO("license_plate_detector.pt") + ocr_reader = easyocr.Reader(["nl"]) # from authlib.integrations.flask_client import OAuth diff --git a/application/dashboard/templates/add.html b/application/dashboard/templates/add.html index 8dcd3c4..95451dd 100644 --- a/application/dashboard/templates/add.html +++ b/application/dashboard/templates/add.html @@ -47,6 +47,15 @@ {{ plate.id }} {{ plate.plate }} + + Edit +
+ +
+ {% endfor %} @@ -55,4 +64,35 @@ + + + + {% endblock %} \ No newline at end of file diff --git a/application/dashboard/templates/dashboard.html b/application/dashboard/templates/dashboard.html index 4d642a1..cb73ee9 100644 --- a/application/dashboard/templates/dashboard.html +++ b/application/dashboard/templates/dashboard.html @@ -18,9 +18,10 @@ - - + + + @@ -33,6 +34,10 @@ {{ log.allowed }} + {% endfor %} diff --git a/application/dashboard/templates/edit.html b/application/dashboard/templates/edit.html deleted file mode 100644 index 1e0a040..0000000 --- a/application/dashboard/templates/edit.html +++ /dev/null @@ -1,110 +0,0 @@ -{%extends 'base.html' %} -{% block content %} - -
-
-

Numberplate

-
-
-
-
-
-
-
-
-
Edit numberplate
-
-
- {{ form.hidden_tag() }} -
- {{ form.numberplate.label }} {{ form.numberplate(class="form-input") }} -
-
- -
- -
-
-
-
- - - - - -{% endblock %} \ No newline at end of file
TimeNumberplateTimeNumberplate Gate Status
+ +
+