Skip to content Skip to sidebar Skip to footer

Models.E006 In Abstract Parent Model - Django 3.1

I have an abstract model and a few other classes that inherit from it. # models.py class Parameter(models.Model): data = integer = models.IntegerField(blank=True, null=True)

Solution 1:

The error is unrelated to the abstract base class.

The problem is the = integer when you define the IntegerField, which means the field is created twice.

Change:

data = integer = models.IntegerField(blank=True, null=True)`

to

data = models.IntegerField(blank=True, null=True)

Post a Comment for "Models.E006 In Abstract Parent Model - Django 3.1"