0

Given this simple user model:

class User(AbstractUser):
    height = models.IntegerField(default=0)
    # active= models.CharField(db_column='is_active') ??? How

The is_active is a field in AbstractUser but I want to refer to it as active. Using the same db_column gives the following error:

Field 'active' has column name 'is_active' that is used by another field. HINT: Specify a 'db_column' for the field.

How can this be accomplished?

Sam R.
  • 16,027
  • 12
  • 69
  • 122

0 Answers0