[Python] How to delete old image when update ImageField?

Discussão em 'Python' iniciado por Stack, Novembro 21, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using Django to create a stock photo site, I have an ImageField in my model, the problem is that when the user updates the image field, the original image file isn't deleted from the hard disk.

    How can I delete the old images after an update?

    Continue reading...

Compartilhe esta Página