如果我希望以后能够在Role类中为我的TYPES_CHOICES元组添加额外的选择,那将如何实现?用表格?
class Member(models.Model):
firstName = models.CharField(max_length = 20)
lastName = models.CharField(max_length = 20)
address = models.ForeignKey(models.ForeignKey(Address)
memberContactInfo = models.ForeignKey(MemberContactInfo)
role = models.ForeignKey(Role)
class Role(models.Model)
TYPES_CHOICES = (
('PLAYER', 'Player'),
('CONDUCTOR', 'Conductor'),
('COMMITTEEMEMBER', 'Committee Member'),
('LIBRARIAN', 'Librarian'),
('TUTOR', 'Tutor'),
('ACOCOUNTANT', 'Accountant'),
('PRESIDENT', 'President'),
('CHAIRMAN', 'Chairman'),
('SECRETARY', 'Secretary')
)
type = models.CharField(_('Type'), max_length = 20, choices = TYPES_CHOICES)