- Doku zu Fields:
https://docs.djangoproject.com/en/2.2/ref/forms/fields/
'''
+
class VorlagenForm(forms.Form):
- template = forms.ChoiceField(choices=())
- def __init__(self, *args, templates=[('AB', 'ab'),('BC','bc')], **kwargs):
+ vorlage = forms.ChoiceField(choices=())
+ def __init__(self, *args, vorlagen=[('AB', 'ab'),('BC','bc')], **kwargs):
#self.templates = templates
super().__init__(*args, **kwargs)
- self.fields['template'].choices = templates
+ self.fields['vorlage'].choices = vorlagen
class VorlagenVerwaltungForm(forms.Form):
vorlagen_zu_loschen = forms.MultipleChoiceField(