I have ChoiceField in my Django model which consist of several choices and i am using the CheckboxSelectMultiple widget in forms to have multiple select options.
models-
BREAKFAST_CHOICES = (('fruits', 'A bowl of fruits with nuts'),
('tofu', 'Tofu Omlette'),
('1', 'Option 1'),
('2', 'Option 2'),
('3', 'Option 3'),)
breakfast = MultiSelectField(choices=VBREAKFAST_CHOICES, null=True, blank=True, default=False)
forms-
widgets = {
'breakfast': forms.CheckboxSelectMultiple,
}
Now, in the future if I want to change the existing choice (options) with some other or add and delete options,how can i do this? Is there an easier way for a non programmer to just externally update a file and achieve this? i.e can my choicefield take an external file containing the list of options which can be edited as and when required.