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
                listing.save(['photo_5'])
                return True

photo_5 is an Imagefield and i want to change the value of that field in 
database to None.

Why is not changing? 

Thanks for your help.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f24fda94-428d-4f76-b632-4078d948fdcf%40googlegroups.com.

Reply via email to