From ebc536ca0a3766c66d487a818b6607094f7b7414 Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Thu, 23 Jul 2015 15:12:48 -0300 Subject: [PATCH] Add choices to model Comissao.unidade_deliberativa --- comissoes/models.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/comissoes/models.py b/comissoes/models.py index 6502ac7c0..a28bfd79d 100644 --- a/comissoes/models.py +++ b/comissoes/models.py @@ -29,6 +29,11 @@ class TipoComissao(models.Model): class Comissao(models.Model): + UNIDADE_DELIBERATIVA_CHOICES, SIM, NAO = make_choices( + True, _('Sim'), + False, _('Não'), + ) + tipo = models.ForeignKey(TipoComissao, verbose_name=_('Tipo')) nome = models.CharField(max_length=60, verbose_name=_('Nome')) sigla = models.CharField(max_length=10, verbose_name=_('Sigla')) @@ -75,7 +80,8 @@ class Comissao(models.Model): blank=True, null=True, verbose_name=_('Finalidade')) email = models.CharField( max_length=100, blank=True, null=True, verbose_name=_('E-mail')) - unidade_deliberativa = models.BooleanField() + unidade_deliberativa = models.BooleanField( + choices=UNIDADE_DELIBERATIVA_CHOICES) class Meta: verbose_name = _('Comissão')