From e690793e3047eefab227c59215644cdf65a8b95d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ses=C3=B3stris=20Vieira?= Date: Wed, 25 Oct 2023 11:13:49 -0300 Subject: [PATCH] =?UTF-8?q?Primeiro=20modelo=20=C3=A9=20o=20valor=20defaul?= =?UTF-8?q?t=20no=20form.=20Gertiq=20#167327?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/apps/eventos/admin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sigi/apps/eventos/admin.py b/sigi/apps/eventos/admin.py index a0ea07a..e9ef123 100644 --- a/sigi/apps/eventos/admin.py +++ b/sigi/apps/eventos/admin.py @@ -915,7 +915,9 @@ class EventoAdmin(CartExportMixin, admin.ModelAdmin): pdf.write_pdf(target=response) return response else: - form = SelecionaModeloForm() + form = SelecionaModeloForm( + initial={"modelo": ModeloDeclaracao.objects.first().id} + ) context = { "form": form,