Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from django.db import models
- import uuid
- import string
- import random
- class Usuarios(models.Model):
- default_key = ''.join(
- random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(10)
- )
- id = models.UUIDField(
- primary_key=True,
- default=uuid.uuid4,
- null=False,
- blank=True,
- )
- login = models.CharField(
- max_length=8,
- null=False,
- blank=False,
- unique=True,
- )
- senha = models.CharField(
- max_length=15,
- default=default_key,
- null=False,
- blank=True,
- )
- data_nascimento = models.DateField(
- null=False,
- blank=False,
- )
Advertisement
Add Comment
Please, Sign In to add comment