From 61deb96961fbc84a130abf58a59c9ca380190f0a Mon Sep 17 00:00:00 2001 From: moanos Date: Wed, 18 Jun 2025 14:59:35 +0200 Subject: [PATCH] fix: fix rendering of adoption notice edit form --- .../forms/form-adoption-notice-basic.html | 13 +++++++++++++ src/fellchensammlung/views.py | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 src/fellchensammlung/templates/fellchensammlung/forms/form-adoption-notice-basic.html diff --git a/src/fellchensammlung/templates/fellchensammlung/forms/form-adoption-notice-basic.html b/src/fellchensammlung/templates/fellchensammlung/forms/form-adoption-notice-basic.html new file mode 100644 index 0000000..5f9f3e2 --- /dev/null +++ b/src/fellchensammlung/templates/fellchensammlung/forms/form-adoption-notice-basic.html @@ -0,0 +1,13 @@ +{% extends "fellchensammlung/base_bulma.html" %} +{% load i18n %} +{% load widget_tweaks %} + +{% block content %} +

{{ adoption_notice }}

+
+ {% csrf_token %} + + {{ form }} + +
+{% endblock %} \ No newline at end of file diff --git a/src/fellchensammlung/views.py b/src/fellchensammlung/views.py index aac0927..3365b49 100644 --- a/src/fellchensammlung/views.py +++ b/src/fellchensammlung/views.py @@ -165,7 +165,7 @@ def adoption_notice_edit(request, adoption_notice_id): return redirect(reverse("adoption-notice-detail", args=[adoption_notice_instance.pk], )) else: form = AdoptionNoticeForm(instance=adoption_notice) - return render(request, 'fellchensammlung/forms/form-animal.html', context={"form": form}) + return render(request, 'fellchensammlung/forms/form-adoption-notice-basic.html', context={"form": form}) def search_important_locations(request, important_location_slug): @@ -683,7 +683,7 @@ def list_rescue_organizations(request, template='fellchensammlung/bulma-animal-s def detail_view_rescue_organization(request, rescue_organization_id, - template='fellchensammlung/details/bulma-detail-rescue-organization.html'): + template='fellchensammlung/details/detail-rescue-organization.html'): org = RescueOrganization.objects.get(pk=rescue_organization_id) return render(request, template, context={"org": org, "map_center": org.position, "zoom_level": 6, "map_pins": [org]})