From 9aef2975cdf0671b4fad51bc1e0fbf4c6d7da96b Mon Sep 17 00:00:00 2001 From: LeandroJatai Date: Thu, 1 Aug 2024 09:42:15 -0300 Subject: [PATCH] fix: torna cep opcional no model CasaLegislativa MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Solicitação feita pelo Parlamento de Timor Leste devido a não possuírem este dado em seu endereçamento. --- sapl/base/models.py | 2 +- sapl/templates/base.html | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sapl/base/models.py b/sapl/base/models.py index e0f00bbf2..692c55138 100644 --- a/sapl/base/models.py +++ b/sapl/base/models.py @@ -56,7 +56,7 @@ class CasaLegislativa(models.Model): nome = models.CharField(max_length=100, verbose_name=_('Nome')) sigla = models.CharField(max_length=100, verbose_name=_('Sigla')) endereco = models.CharField(max_length=100, verbose_name=_('Endereço')) - cep = models.CharField(max_length=100, verbose_name=_('CEP')) + cep = models.CharField(max_length=100, blank=True, verbose_name=_('CEP')) municipio = models.CharField(max_length=50, verbose_name=_('Município')) uf = models.CharField(max_length=2, choices=LISTA_DE_UFS, diff --git a/sapl/templates/base.html b/sapl/templates/base.html index 16e5351d6..abbfeea4a 100644 --- a/sapl/templates/base.html +++ b/sapl/templates/base.html @@ -215,14 +215,14 @@
{{ endereco }} -
CEP: {{ cep }} | Telefone: {{ telefone }} + {% if cep or telefone%}
{% endif %} + {% if cep %}CEP: {{ cep }}{% endif %} + {% if cep and telefone%}|{% endif %} + {% if telefone %}Telefone: {{ telefone }}{% endif %}
{% trans 'OpenAPI' %} | - {% trans 'Site' %} | {% trans 'Fale Conosco' %} - - {% else %} @@ -304,7 +304,7 @@ {% endif %} {% endif %} - + {% endblock foot_js %}