From 5d53d5984852a4d8d1aaab2b2f20d839bcd01ef8 Mon Sep 17 00:00:00 2001 From: NothRen Date: Wed, 4 Feb 2026 17:00:39 +0100 Subject: [PATCH 1/2] Remove empty location view --- .../templates/location/place_detail.html | 3 +-- .../templates/location/place_list.html | 25 ------------------- openrepairplatform/location/urls.py | 1 - openrepairplatform/location/views.py | 7 ------ openrepairplatform/templates/breadcrumb.html | 2 ++ 5 files changed, 3 insertions(+), 35 deletions(-) delete mode 100644 openrepairplatform/location/templates/location/place_list.html diff --git a/openrepairplatform/location/templates/location/place_detail.html b/openrepairplatform/location/templates/location/place_detail.html index da879728..3e82000a 100644 --- a/openrepairplatform/location/templates/location/place_detail.html +++ b/openrepairplatform/location/templates/location/place_detail.html @@ -10,8 +10,7 @@ {% endblock %} {% block content %} - {% url "location:list" as location_list_url %} - {% include "breadcrumb.html" with current=place first_parent_url=location_list_url first_parent_text="Lieux" %} + {% include "breadcrumb.html" with current=place first_parent_text="Lieux" %}
diff --git a/openrepairplatform/location/templates/location/place_list.html b/openrepairplatform/location/templates/location/place_list.html deleted file mode 100644 index d1ce74ae..00000000 --- a/openrepairplatform/location/templates/location/place_list.html +++ /dev/null @@ -1,25 +0,0 @@ - -{% load assets %} -{% block title %} -{% endblock title %} - -{% block extra_css %} - {% assets "css_places" %} - - {% endassets %} -{% endblock extra_css %} - -{% block content %} -
-{% endblock content %} - -{{ places|json_script:"places" }} - -{% block extra_js %} - - {% assets "js_places" %} - - {% endassets %} -{% endblock extra_js %} diff --git a/openrepairplatform/location/urls.py b/openrepairplatform/location/urls.py index edb24159..dcae32a9 100644 --- a/openrepairplatform/location/urls.py +++ b/openrepairplatform/location/urls.py @@ -3,7 +3,6 @@ app_name = "location" urlpatterns = [ - path("", views.PlaceMapView.as_view(), name="list"), path("create/", views.PlaceCreateView.as_view(), name="create"), path("/edit/", views.PlaceEditView.as_view(), name="edit"), path("/delete/", views.PlaceDeleteView.as_view(), name="delete"), diff --git a/openrepairplatform/location/views.py b/openrepairplatform/location/views.py index 3cb686f3..2d172d69 100644 --- a/openrepairplatform/location/views.py +++ b/openrepairplatform/location/views.py @@ -31,13 +31,6 @@ def delete(self, request, *args, **kwargs): return super().delete(request, *args, **kwargs) -class PlaceMapView(TemplateView): - template_name = "location/place_list.html" - - def get(self, request, *args, **kwargs): - return super().get(request, *args, **kwargs) - - class PlaceFormView(HasAdminPermissionMixin): def form_valid(self, form): form.instance.organization = self.organization diff --git a/openrepairplatform/templates/breadcrumb.html b/openrepairplatform/templates/breadcrumb.html index 24640faa..155e062e 100644 --- a/openrepairplatform/templates/breadcrumb.html +++ b/openrepairplatform/templates/breadcrumb.html @@ -14,6 +14,8 @@ + {% elif first_parent_text %} + {% endif %} From 7797c2afc91746231c164cbca252451e32e88db2 Mon Sep 17 00:00:00 2001 From: NothRen Date: Wed, 4 Feb 2026 17:09:06 +0100 Subject: [PATCH 2/2] Re add template --- .../templates/location/place_list.html | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 openrepairplatform/location/templates/location/place_list.html diff --git a/openrepairplatform/location/templates/location/place_list.html b/openrepairplatform/location/templates/location/place_list.html new file mode 100644 index 00000000..d1ce74ae --- /dev/null +++ b/openrepairplatform/location/templates/location/place_list.html @@ -0,0 +1,25 @@ + +{% load assets %} +{% block title %} +{% endblock title %} + +{% block extra_css %} + {% assets "css_places" %} + + {% endassets %} +{% endblock extra_css %} + +{% block content %} +
+{% endblock content %} + +{{ places|json_script:"places" }} + +{% block extra_js %} + + {% assets "js_places" %} + + {% endassets %} +{% endblock extra_js %}