diff --git a/sigi/apps/casas/models.py b/sigi/apps/casas/models.py index 16f8e4d..e1437f5 100644 --- a/sigi/apps/casas/models.py +++ b/sigi/apps/casas/models.py @@ -20,14 +20,14 @@ class CasaLegislativa(models.Model): 'Exemplo: cmpains.', blank=True ) - tipo = models.CharField(max_length=2, choices=CASA_CHOICES) - cnpj = models.CharField('CNPJ', max_length=18) + tipo = models.CharField(max_length=2, choices=CASA_CHOICES, default='CM') + cnpj = models.CharField('CNPJ', max_length=18, blank=True) logradouro = models.CharField( max_length=100, help_text='Avenida, rua, praça, jardim, parque...' ) - bairro = models.CharField(max_length=40) + bairro = models.CharField(max_length=40, blank=True) municipio = models.ForeignKey( 'contatos.Municipio', verbose_name='município' @@ -60,7 +60,3 @@ class CasaLegislativa(models.Model): def __unicode__(self): return self.nome - - def uf (self): - return self.municipio.uf.nome - uf.short_description = 'Unidade Federativa'