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 User
c = Certifier.objects.create(
type="admin",
user=User.objects.latest('date_joined'),
)
p = c.profile_ptr
print(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.