2011-09-13 8 views
3

私は2つのモデルがあります:ジャンゴmodels.ForeignKeyフィルタ

class Foo(models.Model): 
    name... 
    type = models.CharField(choices=TYPE_CHOICES) 

class Fighter(models.Model): 
    foo = models.ForeignKey(Foo, filter(type="A") 

はあなたが外部キーのドロップダウンリストをフィルタリングすることができますか?

答えて