-
-
Notifications
You must be signed in to change notification settings - Fork 302
Open
Description
I have found that, in my base model class, I want to add a UniqueTogether to the constraints in the Meta, with a condition of the form:
~Q(instance_of=DerivedModel)
where DerivedModel is inheriting from this base class. Because of the inheritance, I have to define DerivedModel after this one, but that also means it's not yet defined for me to reference in the Meta class.
Can this Q-object be made to accept a string, as well? That's how other components, such as ForeignKey, deal with the same type of problem with circular dependency.
Or is there a solution here that I'm not thinking of?