[Django]-Django inline-formset with an image field not updating

5👍

There are a few issues I noticed with your form.

  1. You need to include enctype=”multipart/form-data” on your form attributes or else you won’t be able to post file data to the server
  2. I would use the Django methods for rendering the form (form.as_p, form.as_table or form.as_ul) if you absolutely need to use manual rendering then follow the official guide: model formsets
  3. On the post method your formset is missing FILES and instance

Once you implement these changes your formset should work just fine.

Leave a comment