Can you please share how to do the same thing without using crispy forms?
I have tried to do the same and createview is working fine but in UpdateView unable to save the changes made in inline_formset. It save the data when adding new line.
please help me out.
To implement it without crispy forms check out this blog, the solution is not using crispy forms. The UpdateView is essentially the same as CreateView except you need to pass instance (instance=self.object) in get_context_data() because the instance already exists in the database (the code part for this is here ). Hope it helps!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Can you please share how to do the same thing without using crispy forms?
I have tried to do the same and createview is working fine but in UpdateView unable to save the changes made in inline_formset. It save the data when adding new line.
please help me out.
Hi Sachin,
To implement it without crispy forms check out this blog, the solution is not using crispy forms. The UpdateView is essentially the same as CreateView except you need to pass instance (instance=self.object) in get_context_data() because the instance already exists in the database (the code part for this is here ). Hope it helps!