I have three objects:
Thing
some fields
Bucket
things = models.ManyToManyField(Thing)
User
buckets = models.ManyToManyField(Bucket)
things = models.ManyToManyField(Thing)
When editing my "Bucket" field in the admin, I want to be able to select Things, but only those things that are in the "Things" list on the user currently logged in.
How can I do that? In other words, how can I filter the list of Things in the Bucket admin?
Thank you very much for your help in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…