I have a model like:
CAMPAIGN_TYPES = (
('email','Email'),
('display','Display'),
('search','Search'),
)
class Campaign(models.Model):
name = models.CharField(max_length=255)
type = models.CharField(max_length=30,choices=CAMPAIGN_TYPES,default='display')
And a form:
class CampaignForm(ModelForm):
class Meta:
model = Campaign
Is there a way to limit what choices are available for the 'type' field? I know for a single value field I can do: CampaignForm(initial={'name':'Default Name'}) but I can't find any way to do this for a choice set.