Browse Source

fix: torna cep opcional no model CasaLegislativa

Solicitação feita pelo Parlamento de Timor Leste devido a não possuírem
este dado em seu endereçamento.
pull/3721/merge
LeandroJatai 5 months ago
parent
commit
9aef2975cd
  1. 2
      sapl/base/models.py
  2. 10
      sapl/templates/base.html

2
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,

10
sapl/templates/base.html

@ -215,14 +215,14 @@
</strong>
<br>
<span class="street-address">{{ endereco }}</span>
<br> CEP: <span class="postal-code">{{ cep }}</span> | Telefone: <span>{{ telefone }}</span>
{% if cep or telefone%}<br>{% endif %}
{% if cep %}CEP: <span class="postal-code">{{ cep }}</span>{% endif %}
{% if cep and telefone%}|{% endif %}
{% if telefone %}Telefone: <span>{{ telefone }}</span>{% endif %}
<br>
<small><a href="{% url 'sapl.api:swagger_ui_schema_api' %}">{% trans 'OpenAPI' %}</a></small> |
<a href="{{endereco_web}}" class="url">{% trans 'Site' %}</a> |
<a href="mailto:{{email}}" class="email">{% trans 'Fale Conosco' %}</a>
</small>
</address>
{% else %}
@ -304,7 +304,7 @@
</script>
{% endif %}
{% endif %}
{% endblock foot_js %}
</body>
</html>

Loading…
Cancel
Save