0
我正在使用一个对象的多表继承,并且我需要将父对象外键引用的选择限制为仅应用子系统的规则。覆盖继承的行为
from schedule.models import Event, Rule
class AirShowRule(Rule):
"""
Inheritance of the schedule.Rule
"""
rule_type = models.TextField(default='onAir')
class AirShow(Event):
station = models.ForeignKey(Station)
image = models.ImageField(upload_to='images/airshow', null=True, blank= True)
thumb_image = models.ImageField(upload_to='images/airshow', null=True, blank= True)
现在,在管理员中,我只希望AirShowRule(s)成为AirShow(Event)的选项。我得到的是schedule.event系统中的所有规则。
我从http://code.google.com/p/django-schedule/
谢谢我正在研究这个解决方案。 – 2009-07-27 15:55:40