class SupercalifragilisticexpialidociousManager(models.Manager):
# Sorry, I'm sick of Foo and Spam for now.
def get_query_set(self, account=None):
return super(SupercalifragilisticexpialidociousManager,
self).get_query_set().filter(uncle=model_thats_using_this_manager_instance.uncle)
我正在寻找的魔法是“uncle=model_thats_using_this_manager_instance.uncle”。看来我应该能够以某种方式做到这一点。我知道我可以说self.model
获取模型,但是如何获取实例?