fix: Exclude embeddable from xframe options

This commit is contained in:
2025-09-10 19:28:36 +02:00
parent 7572c92da5
commit f3619b2881

View File

@@ -1,9 +1,11 @@
from django.shortcuts import get_object_or_404, render
from django.views.decorators.clickjacking import xframe_options_exempt
from fellchensammlung.aviews.helpers import headers
from fellchensammlung.models import RescueOrganization, AdoptionNotice, Species
@xframe_options_exempt
@headers({"X-Robots-Tag": "noindex"})
def list_ans_per_rescue_organization(request, rescue_organization_id, species_slug=None):
expand = request.GET.get("expand")
@@ -20,4 +22,4 @@ def list_ans_per_rescue_organization(request, rescue_organization_id, species_sl
adoption_notices = [adoption_notice for adoption_notice in ans_of_rescue_org if species in adoption_notice.species]
template = 'fellchensammlung/embeddables/list-adoption-notices.html'
return render(request, template, context={"adoption_notices": adoption_notices})
return render(request, template, context={"adoption_notices": adoption_notices, "expand": expand})