raise Exception("Unsupported configuration")
class InfluenceForm(ContextModelForm):
- other_characters = ModelMultipleChoiceField(queryset=Character.objects.all(), widget=DropDownMultiple)
+ # Manually define this field so we can select the DropDownMultiple
+ # widget. However, we leave the queryset empty, which characters can
+ # be selected depends on the logged in user and should be set by
+ # setting the choices property in the view.
+ other_characters = ModelMultipleChoiceField(queryset=Character.objects.none(), widget=DropDownMultiple)
class Meta:
model = Influence
fields = ('initiator', 'summary', 'other_characters', 'other_contacts', 'description')