Skip to content

Instantly share code, notes, and snippets.

@decko
Created September 29, 2015 21:56
Show Gist options
  • Save decko/8516ddcba2c5833aceb2 to your computer and use it in GitHub Desktop.
Save decko/8516ddcba2c5833aceb2 to your computer and use it in GitHub Desktop.
Models
class Ente(models.Model):
id_pub = models.UUIDField(default=uuid.uuid4, editable=False)
nome = models.CharField(_('Nome'), max_length=100, blank=False)
endereco = models.TextField(_('Endereço'), blank=True)
bairro = models.TextField(_('Bairro'), blank=True)
uf = models.TextField(_('UF'), blank=True)
cep = models.TextField(_('CEP'), blank=True)
class Meta:
verbose_name = "ente"
verbose_name_plural = "entes"
def __str__(self):
return self.nome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment