mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[1.4.X] Fixed #18413 - Noted that a model's files are not deleted when the model is deleted. Thanks lawgon for the report.
Backport of 1c03b23567 from master
This commit is contained in:
parent
cf482d6e2a
commit
b1462e0a36
@ -672,6 +672,11 @@ the field. Note: This method will close the file if it happens to be open when
|
|||||||
The optional ``save`` argument controls whether or not the instance is saved
|
The optional ``save`` argument controls whether or not the instance is saved
|
||||||
after the file has been deleted. Defaults to ``True``.
|
after the file has been deleted. Defaults to ``True``.
|
||||||
|
|
||||||
|
Note that when a model is deleted, related files are not deleted. If you need
|
||||||
|
to cleanup orphaned files, you'll need to handle it yourself (for instance,
|
||||||
|
with a custom management command that can be run manually or scheduled to run
|
||||||
|
periodically via e.g. cron).
|
||||||
|
|
||||||
``FilePathField``
|
``FilePathField``
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user