I’m just starting with django, and I’m working on a simple book database, in which I would like to include the book covers images.
To make it look better, I’m trying to use floating modal forms, with boostrap and django crispy forms. However, when I try to get the form data, both with create and update forms, the returned request.FILES variable is empty.
Just in case, I tried to create basic create and update forms (named create1 and update1) and everything works properly.
The image below illustrate the both working and non-working views.
In case it is useful, the full code of the project is available in: https://www.dropbox.com/s/0ms52s2re8n0lni/BookForm-SBC.zip?dl=0.
I believe it is a basic mistake, but I still didn’t manage to identify the solution anywhere?
Notice all the forms definition contain the info ‘enctype=“multipart/form-data”’, as recommended in many places.
Can anyone give me an advise on how to proceed?