While I'm at it can anyone recommend any django books worth reading? I've gone through the base tutorial, dug through documentation as needed, and read Two Scoops of Django: so if you can think of a book for someone at my level, that'd be greatly appreciated. I know this has a painfully simple solution, so thanks for your patience in advance everyone. Unternehmenstyp = ModelMultipleChoiceField(widget=CheckboxSelectMultiple,required=True, queryset=()) Template_name = 'kunden/kunde_update.html'įrom import CheckboxSelectMultipleįrom django.forms import ModelMultipleChoiceField,ModelForm Is there a way to use a widget with just one field without having to redefine the entire form?įrom import UpdateViewįrom kunden.models import Kunde, Unternehmenstyp
I have a model with a ManyToMany relation that I would like to update with a CheckBoxSelectMultiple widget while everything else uses the default generic form, but when I redefine that one form field, it is the only one that shows up in the UpdateView.