From 278b9b39489247ae102f01f26560a2da93183864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ses=C3=B3stris=20Vieira?= Date: Thu, 15 Dec 2022 11:52:38 -0300 Subject: [PATCH] Melhora navigator e permite x-frame-extempt --- .../templates/servicos/navigator_snippet.html | 18 +++++++++++++++--- sigi/apps/servicos/views.py | 5 +++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/sigi/apps/servicos/templates/servicos/navigator_snippet.html b/sigi/apps/servicos/templates/servicos/navigator_snippet.html index aa91520..1a307b0 100644 --- a/sigi/apps/servicos/templates/servicos/navigator_snippet.html +++ b/sigi/apps/servicos/templates/servicos/navigator_snippet.html @@ -3,11 +3,23 @@
diff --git a/sigi/apps/servicos/views.py b/sigi/apps/servicos/views.py index 285c8fe..27866af 100644 --- a/sigi/apps/servicos/views.py +++ b/sigi/apps/servicos/views.py @@ -3,6 +3,7 @@ from django.db.models import Q from django.http import HttpResponse from django.shortcuts import render from django.utils.translation import gettext as _ +from django.views.decorators.clickjacking import xframe_options_exempt from django.views.generic import ListView from import_export import resources from import_export.fields import Field @@ -111,3 +112,7 @@ class CasasAtendidasListView(ListView): }, ) return super().render_to_response(context, **response_kwargs) + + @xframe_options_exempt + def dispatch(self, *args, **kwargs): + return super().dispatch(*args, **kwargs)