from django.db import models
from django.contrib.auth.models import User


class Usuario(models.Model):
    username = models.CharField(primary_key=True, max_length=50, blank=
        False, null=False, unique=True)
    password = models.CharField(max_length=50, blank=False, null=False)
    nombre = models.CharField(max_length=50, blank=False, null=False)
    apellidos = models.CharField(max_length=50, blank=False, null=False)
    codigo = models.IntegerField(blank=False, null=False)
    inscrito = models.BooleanField(blank=False, null=True)


class dias(models.Model):
    nombre = models.CharField(primary_key=True, max_length=15)

    def __str__(self):
        return '{}'.format(self.nombre)


class Horario(models.Model):
    estudiante = models.OneToOneField(User, on_delete=models.CASCADE)
    dias = models.ManyToManyField(dias)
    sede = models.CharField(max_length=15, blank=False, null=False)
    jornada = models.CharField(max_length=15, blank=False, null=False)

d451cdc8890a3a7493ba1ea6db5242d200b1e05b
<mask token>


class dias(models.Model):
    <mask token>
    <mask token>


class Horario(models.Model):
    estudiante = models.OneToOneField(User, on_delete=models.CASCADE)
    dias = models.ManyToManyField(dias)
    sede = models.CharField(max_length=15, blank=False, null=False)
    jornada = models.CharField(max_length=15, blank=False, null=False)

<mask token>


class Usuario(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>


class dias(models.Model):
    nombre = models.CharField(primary_key=True, max_length=15)

    def __str__(self):
        return '{}'.format(self.nombre)


class Horario(models.Model):
    estudiante = models.OneToOneField(User, on_delete=models.CASCADE)
    dias = models.ManyToManyField(dias)
    sede = models.CharField(max_length=15, blank=False, null=False)
    jornada = models.CharField(max_length=15, blank=False, null=False)

<mask token>


class Usuario(models.Model):
    username = models.CharField(primary_key=True, max_length=50, blank=
        False, null=False, unique=True)
    password = models.CharField(max_length=50, blank=False, null=False)
    nombre = models.CharField(max_length=50, blank=False, null=False)
    apellidos = models.CharField(max_length=50, blank=False, null=False)
    codigo = models.IntegerField(blank=False, null=False)
    inscrito = models.BooleanField(blank=False, null=True)


class dias(models.Model):
    nombre = models.CharField(primary_key=True, max_length=15)

    def __str__(self):
        return '{}'.format(self.nombre)


class Horario(models.Model):
    estudiante = models.OneToOneField(User, on_delete=models.CASCADE)
    dias = models.ManyToManyField(dias)
    sede = models.CharField(max_length=15, blank=False, null=False)
    jornada = models.CharField(max_length=15, blank=False, null=False)

from django.db import models
from django.contrib.auth.models import User


class Usuario(models.Model):
    username = models.CharField(primary_key=True, max_length=50, blank=
        False, null=False, unique=True)
    password = models.CharField(max_length=50, blank=False, null=False)
    nombre = models.CharField(max_length=50, blank=False, null=False)
    apellidos = models.CharField(max_length=50, blank=False, null=False)
    codigo = models.IntegerField(blank=False, null=False)
    inscrito = models.BooleanField(blank=False, null=True)


class dias(models.Model):
    nombre = models.CharField(primary_key=True, max_length=15)

    def __str__(self):
        return '{}'.format(self.nombre)


class Horario(models.Model):
    estudiante = models.OneToOneField(User, on_delete=models.CASCADE)
    dias = models.ManyToManyField(dias)
    sede = models.CharField(max_length=15, blank=False, null=False)
    jornada = models.CharField(max_length=15, blank=False, null=False)
