FormCollection submission returns status 200 but no data is saved in the database. #210
Replies: 3 comments
-
Why did you use Please read the contribution guidelines on how to create issues. Your's isn't even formatted properly. |
Beta Was this translation helpful? Give feedback.
-
"I thought EditCollectionView was for updates and FormCollectionView for creation. class addprojet(EditCollectionView): and now I get this error "Generic detail view addprojet must be called with either an object pk or a slug in the URLconf." I also note that my form uses StepperCollection." |
Beta Was this translation helpful? Give feedback.
-
I now updated the documentation which hopefully explains this pattern better. You can also have a look at this example https://django-formset.fly.dev/bootstrap/company whose code can be found here: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey geeks,
I’m learning Django-Formset, and I’m facing an issue when saving data from a FormCollection. When sending the AJAX request, I receive a 200 status, but no data is saved in the database.
views.py
class addprojet(FormCollectionView,FormViewMixin,IncompleteSelectResponseMixin):
collection_class = ProjetCollection
models
class Perimetre(models.Model):
class Integration(models.Model):
class PerimetreForm(FormMixin, forms.ModelForm):
class IntegrationForm(FormMixin, forms.ModelForm):
class ProjetCollection(StepperCollection):
legend = "Enregister un nouveau projet"
perimetre = PerimetreForm()
integration = IntegrationForm()
Beta Was this translation helpful? Give feedback.
All reactions