2010-11-24 71 views

回答

3

假设你正在使用Django的管理站点,我想你可能希望limit_choices_to选项:

customer = models.ForeignKey(Customer, limit_choices_to={'active': True})