Django 1.9: Field clashes with the field of non-existing field in parent model Django 1.9: Field clashes with the field of non-existing field in parent model django django

Django 1.9: Field clashes with the field of non-existing field in parent model


I think that you shouldn't use name certifier for that foreign key relation because class Profile actually has certifier, admin and designer fields(although by descriptor) according to docs and in that case names actually would clash.

from django.contrib.auth.models import Userc = Certifier.objects.create(    type='admin',    user=User.objects.latest('date_joined'),)p = c.profile_ptrprint(p.certifier) #username (admin)

Change to something like certifier_field = models.ForeignKey(Certifier)

As it was pointed out in comments, you could rename the models to CertifierProfile, AdminProfile etc to avoid the clash.

Or you could also silence the check by adding SILENCED_SYSTEM_CHECKS = ['models.E006'] to your settings, but this is not a good approach.


You can specify Profile is an abstract class. This will stop the check from being confused with your parent fields.

class Meta:    abstract = True