Answer the question
In order to leave comments, you need to log in
Is there a way to combine TreeForeignKey and ChainedForeignKey?
Let's say we have a model like this:
class Subdivision(MPTTModel):
subdivision = models.CharField(verbose_name="subdivision", max_length=255)
affiliate = models.ForeignKey(Group)
parent = TreeForeignKey("self", null=True, blank=True, related_name="childrens")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question