I am also not sure of the scope of your question. If you're asking about a file deleted from the system by a method other than Django. I use a trusted database of files required with a hash and have a process (Django script) that runs and checks both the presence of a file and its hash code. This notifies me of not only deletions but also changes to core items that I want to monitor by any method outside my control updates that maintain the trusted database and log dates who made the change. This also helped me monitor for duplicate pictures and files so that if someone loads a second copy of the same picture for a different page even with a different name it is noted by the hashcode. So if one image is being updated other pages can be reviewed as well to see if they should be updated at the same time. Do we need both or should we change both images and update both pages? There is also a file with pages and keys to external use static items on a page. Many are done systematically with code and databases this picture, this text, and this format so the programmed changes also maintain much of the database updates. The more pages added the more complex the maintenance without the help from the system as pages are added and deleted or updated. This ensures that an image is not removed if removing a page and it is not the only user of the image. This helps prevent broken links or you can scan logs for 404 but then a user gets the message instead of prevention.
The signals are great for triggering events done through Django code and database actions. But I don't think it can detect that an image was substituted or deleted outside of its code base but OS commands or rouge programs. It would be much harder to both change the file and update the hashcode. Using signals and a trusted db might give you the best of both worlds On Tuesday, October 3, 2023 at 9:59:00 PM UTC-6 David Nugent wrote: > The may not be enough context in your question but I imagine that the > following link may take you to something that may work for you. > > https://docs.djangoproject.com/en/4.2/topics/signals/ > > > On 4 October 2023 at 14:42:45, Ram (ram.mu...@gmail.com) wrote: > >> Hi, >> >> We would like to add this feature in our Web application and capture the >> following events in log files: >> >> 1. If any image is deleted by any reason >> 2. Any content is deleted by any reason >> >> Does Django have any libraries or functions to achieve this? >> >> Best regards, >> ~Ram >> >> >> -- >> 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...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CA%2BOi5F3GDxbL_3C20ygwE9yumUdLxDgZJRdLEuM9Wdm%2BeTyfEA%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/django-users/CA%2BOi5F3GDxbL_3C20ygwE9yumUdLxDgZJRdLEuM9Wdm%2BeTyfEA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- 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/3cf742a1-9ca8-4209-9c7a-b925ad368244n%40googlegroups.com.