From e0f07fc95468b1c6409201eb4d5611da7127c487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Anton=20M=C3=BCller?= Date: Thu, 25 Jan 2024 11:01:09 +0100 Subject: [PATCH 1/2] Kommata! --- .../apis_relations/delete_button_generic_ajax_form.html | 2 +- .../templates/apis_relations/delete_button_label_form.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apis_core/apis_relations/templates/apis_relations/delete_button_generic_ajax_form.html b/apis_core/apis_relations/templates/apis_relations/delete_button_generic_ajax_form.html index 9188922..7252f19 100644 --- a/apis_core/apis_relations/templates/apis_relations/delete_button_generic_ajax_form.html +++ b/apis_core/apis_relations/templates/apis_relations/delete_button_generic_ajax_form.html @@ -4,7 +4,7 @@ title="Verbindung löschen" hx-get="/apis/relations/delete/{{ record.pk }}/" hx-target="closest tr" hx-swap="outerHTML swap:1s" - hx-confirm="Sicher? Weil was weg ist ist weg" + hx-confirm="Sicher? Weil was weg ist, ist weg" > \ No newline at end of file diff --git a/apis_core/apis_relations/templates/apis_relations/delete_button_label_form.html b/apis_core/apis_relations/templates/apis_relations/delete_button_label_form.html index 6b890ea..e59e548 100644 --- a/apis_core/apis_relations/templates/apis_relations/delete_button_label_form.html +++ b/apis_core/apis_relations/templates/apis_relations/delete_button_label_form.html @@ -2,7 +2,7 @@ class="btn" hx-trigger="click" hx-post="/apis/labels/delete-from-tabel/{{ record.pk }}/" - hx-confirm="Sicher? Weil was weg ist ist weg" + hx-confirm="Sicher? Weil was weg ist, ist weg" hx-target="closest tr" hx-swap="outerHTML swap:1s" > From 15ecf6799fd069cd27cb47d1cbebe26ff3ad5048 Mon Sep 17 00:00:00 2001 From: csae8092 Date: Sat, 27 Jan 2024 18:10:27 +0100 Subject: [PATCH 2/2] potential fix for broken network autocomplete --- apis_core/apis_metainfo/models.py | 4 ++-- apis_core/urls.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apis_core/apis_metainfo/models.py b/apis_core/apis_metainfo/models.py index d43ac6c..89f6fc0 100644 --- a/apis_core/apis_metainfo/models.py +++ b/apis_core/apis_metainfo/models.py @@ -276,7 +276,7 @@ def merge_with(self, entities): if not isinstance(entities, list) and not isinstance(entities, QuerySet): entities = [entities] entities = [ - self_model_class.objects.get(pk=ent) if type(ent) == int else ent + self_model_class.objects.get(pk=ent) if type(ent) == int else ent # noqa: E721 for ent in entities ] rels = ContentType.objects.filter( @@ -304,7 +304,7 @@ def merge_with(self, entities): for u in Uri.objects.filter(entity=ent): u.entity = self u.save() - for l in Label.objects.filter(temp_entity=ent): + for l in Label.objects.filter(temp_entity=ent): # noqa: E741 l.temp_entity = self l.save() for r in rels.filter(model__icontains=e_b): diff --git a/apis_core/urls.py b/apis_core/urls.py index e84b6dd..03eb28f 100644 --- a/apis_core/urls.py +++ b/apis_core/urls.py @@ -8,6 +8,7 @@ from apis_core.apis_metainfo.views import beacon from apis_core.apis_vocabularies.api_views import UserViewSet from apis_core.helper_functions.ContentType import GetContentTypes +from apis_core.apis_entities.autocomplete3 import GenericEntitiesAutocomplete app_name = "apis_core" @@ -37,6 +38,11 @@ else: urlpatterns = [ path("api/", include((router.urls, "apis_core"), namespace="apis_api")), + path( + "api/entities/autocomplete-network//", + GenericEntitiesAutocomplete.as_view(), + name="network-ac", + ), path("beacon/", beacon, name="beacon"), path("labels/", include("apis_core.apis_labels.urls", namespace="apis_labels")), path("tei/", include("apis_core.apis_tei.tei_urls", namespace="apis_tei")),