Browse Source

Corrige label e adiciona filtro por data

pull/163/head
Sesostris Vieira 2 years ago
parent
commit
94f8efcdf7
  1. 3
      sigi/apps/eventos/admin.py
  2. 2
      sigi/apps/eventos/models.py

3
sigi/apps/eventos/admin.py

@ -22,7 +22,7 @@ from sigi.apps.eventos.models import (
Anexo, Anexo,
) )
from sigi.apps.eventos.forms import EventoAdminForm from sigi.apps.eventos.forms import EventoAdminForm
from sigi.apps.utils.filters import EmptyFilter from sigi.apps.utils.filters import EmptyFilter, DateRangeFilter
from sigi.apps.utils.mixins import CartExportMixin, ValueLabeledResource from sigi.apps.utils.mixins import CartExportMixin, ValueLabeledResource
@ -163,6 +163,7 @@ class EventoAdmin(CartExportMixin, admin.ModelAdmin):
("num_processo", EmptyFilter), ("num_processo", EmptyFilter),
"tipo_evento", "tipo_evento",
"tipo_evento__categoria", "tipo_evento__categoria",
("data_inicio", DateRangeFilter),
"virtual", "virtual",
"municipio__uf", "municipio__uf",
"solicitante", "solicitante",

2
sigi/apps/eventos/models.py

@ -29,7 +29,7 @@ class TipoEvento(models.Model):
nome = models.CharField(_("Nome"), max_length=100) nome = models.CharField(_("Nome"), max_length=100)
categoria = models.CharField( categoria = models.CharField(
_("Categoaria"), max_length=1, choices=CATEGORIA_CHOICES _("Categoria"), max_length=1, choices=CATEGORIA_CHOICES
) )
casa_solicita = models.BooleanField(_("casa pode solicitar"), default=False) casa_solicita = models.BooleanField(_("casa pode solicitar"), default=False)

Loading…
Cancel
Save