0👍
✅
It is possible to write a custom function allows you to delete individual images. This may not be the best option but it works for me.
👤tim
1👍
Iterate over a forloop.
queryset=Photos.objects.filter(car_id = pk)
for img in queryset:
img.delete()
or if you want to delete first image, then;
queryset[0].delete()
- Django mutliple same GET parameter names not working
- Django Model forms: how change html of a field
- How to use images loaded with webpack in django templates?
- Refresh/redraw jquery datatables with data from django view
Source:stackexchange.com