un1t / django-cleanup

Automatically deletes old file for FileField and ImageField. It also deletes files on models instance deletion.
MIT License
1.11k stars 79 forks source link

Drop Django 1.6 support and reorganize code. #29

Closed vinnyrose closed 8 years ago

vinnyrose commented 9 years ago

Move models.py to handlers.py. Add back the original pre_save as a fallback. Make the cache into its own module in cache.py with related functions. Make a public module in cleanup.py to manually refresh the instance cache. Workaround a bug in refresh_from_db which leaves FileFields with reference to the wrong instance. (Reported: khamaileon) Workaround a bug in the FileFields descriptor which doesn't recover Fields or storage classes after a pickle/unpickle. (Reported: khamaileon) Workaround behavior of a FieldFile's delete method which sets the field to None on the instance. (Reported: Pierre Chiquet) Add tests for all of these workarounds.

vinnyrose commented 9 years ago

Fixes #25 Fixes #27

github-actions[bot] commented 2 years ago

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.