class Aptitudes(models.Model): Usuario = models.ForeignKey(User, on_delete=models.CASCADE,null=True,blank=True) Area = models.ForeignKey(Areas, on_delete=models.CASCADE) Imagen = models.ImageField(upload_to=content_file_name,null=True,blank=True) Nombre = models.CharField(max_length = 120,null=True,blank=True) Descripccion = models.TextField() Fecha = models.DateTimeField(default=timezone.now)
class Pregunta(models.Model): pregunta = models.CharField(max_length = 100,null=True,blank=True) a = models.CharField(max_length = 100,null=True,blank=True) b = models.CharField(max_length = 100,null=True,blank=True) c = models.CharField(max_length = 100,null=True,blank=True) d = models.CharField(max_length = 100,null=True,blank=True) Cuestionario = models.ForeignKey(Cuestionario, on_delete=models.CASCADE) Aptitud_vinculada = models.ForeignKey(Aptitudes, on_delete=models.CASCADE) Respuesta_correcta = models.CharField(max_length = 10,null=True,blank=True) #Respuestas = models.ForeignKey(Respuestas, on_delete=models.CASCADE,null=True,blank=True) Usuario = models.ForeignKey(User, on_delete=models.CASCADE,null=True,blank=True)
class Portafolio(models.Model): Nombre = models.CharField(max_length = 50,null=True,blank=True) Usuario = models.ForeignKey(Persona, on_delete=models.CASCADE) aptitude_validadas = models.ForeignKey(Aptitude_validadas, on_delete=models.CASCADE,null=True,blank=True) pdf = models.FileField(upload_to='pdf')
class Cuestionario(models.Model): Aptitud_vinculada = models.ForeignKey(Aptitudes, on_delete=models.CASCADE)
class Aptitude_validadas(models.Model): Usuario = models.ForeignKey(Persona, on_delete=models.CASCADE) Aptitud_validada = models.ForeignKey(Aptitudes, on_delete=models.CASCADE)