I have a model that is inherited from AbstractUser, something like this:
class Driver(AbstractUser): dni = models.CharField(max_length=8,validators=[validate_dni],unique=True) license = models.CharField(max_length=9,unique=True) birthday = models.DateField() sex = models.CharField(max_length=1, choices=SEX_CHOICES) creation_date = models.DateField(auto_now = True)
According to this: https://docs.djangoproject.com/en/dev/topics/auth/customizing/
If you are completely satisfied with the Djangos User model and you just want to add additional profile information, you can simply subclass django.contrib.auth.models.AbstractUser and add your field profile. This class provides a complete implementation of the User as an abstract model.
But in my admin view, the password field is a simple text input, and the password is saved as the source text. I could try with AbstractBaseUser, but first I need to clarify this problem. I start with Django, so I'm a little newbie.
Thanks.
source share