Good I am modifying my project and decided to place a ChoiceField but when I want to make the makemigrate
I get the following error:
File "/home/jbarreto/Documentos/Misproyectos/Personal/personal/datos/models.py", line 8, in Employees genre = models.ChoiceField () AttributeError: module 'django.db.models' has no attribute 'ChoiceField'
This is my models.py :
from django.db import models
class Empleados(models.Model):
nombre = models.CharField(max_length=15)
apellidos = models.CharField(max_length=15)
ci = models.IntegerField()
genero = models.ChoiceField()
cargo = models.CharField(max_length=15)
creado = models.DateTimeField(auto_now_add=True)
email = models.EmailField()
telefono = models.CharField(max_length=12)
documento = models.FileField(
upload_to="archivo/",
null=True,
blank=True
)
def __str__(self):
return '%s'% (self.nombre)
I'm new in this I need help, thanks