I have a many-to-many relationship in the Django model (1.4).
class UserProfile(models.Model): foos = models.ManyToManyField(Foo)
I want every user (profile) to have at least one Foo. Foos may have zero or more user (s) s.
I would really like this to be done at the model and administrator level, but itβs enough to provide it in the admins.
If I understand correctly, "many" in Django-talk have a value of zero or more.
I need a ManyToOneOrMore relation. How can i do this?
Thanks,
Chris.
django orm
fadedbee
source share