You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a CBV and have no issues with django-selelect2 with a CreateView. However, I do have issues with an UpdateView where I need to retrieve the value from the database and have the form show the selected the value. I have two fields and my 'name' column works correctly in that it retrieves the value correctly 9and also updates) as I have used similar CBV but the clientfield doesn't that uses s2form.
Can someone provide a similar example using UpdateView and multiple choice field or widget?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all,
I am using a CBV and have no issues with django-selelect2 with a CreateView. However, I do have issues with an UpdateView where I need to retrieve the value from the database and have the form show the selected the value. I have two fields and my 'name' column works correctly in that it retrieves the value correctly 9and also updates) as I have used similar CBV but the clientfield doesn't that uses s2form.
Can someone provide a similar example using UpdateView and multiple choice field or widget?
`class ProcessMappingGroupUpdateView(SuccessMessageMixin, LoginRequiredMixin, UpdateView):
model = ProcessOrchestration
context_object_name = None
form_class = GroupingForm
template_name = "portal/csp/billing/mappings-edit.html"
success_url = "/billing-mappings"
` class Meta:
model = ProcessOrchestration
fields = {
'name',
'clientfield'
}
Beta Was this translation helpful? Give feedback.
All reactions