[Fixed]-Django syncdb conflicting related_name when using inheritance and ForeignKey

23👍

I think that you will find the following advice in the Django documentation helpful and relevant:
https://docs.djangoproject.com/en/1.7/topics/db/models/#be-careful-with-related-name

Essentially change the declaration of the relation field to:

relation = models.ForeignKey('Delta', related_name="%(app_label)s_%(class)s")

Best of luck…

Leave a comment