I am saving the image to media folder and save the url in database.
photo_5 = models.ImageField(upload_to='photos/%Y/%m/%d/', blank=True)
Then when the user clicks in trash can icon, i have an ajax request to
delete the image from database. But there is the problem, i am not able to
update the
First of all, are you saving image url explicitly in database ? You dont
need to so that to show/delete any image.
Second, try delete() for deletint image entry.
On Wed, 16 Oct 2019, 19:54 Nuno Vieira,
wrote:
> Hi there,
>
> i am creating a real estate app and i want users to insert and delete
Hi there,
i am creating a real estate app and i want users to insert and delete
images for the houses.
It's all working great except the delete.
In my views.py i have the code:
listing = Listing.objects.get(id=1511)
if listing:
listing.photo_5 = None
3 matches
Mail list logo