Created
September 29, 2015 21:56
-
-
Save decko/8516ddcba2c5833aceb2 to your computer and use it in GitHub Desktop.
Models
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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