'Django processing form input name
I have changed the input's name attribute to some custom name, but the view calls form_invalid method. Why my Form isn't saving (validating)?
html:
<tr>
<th><label for="id_photo">Image:</label></th>
<td>
<input type="file" name="custom_photo_name" accept="image/*" required id="id_photo" multiple>
</td>
</tr>
the line in view:
self.request.FILES.getlist('custom_photo_name')
Doesn't the self.request.FILES takes the values according to name attribute?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
