Code

Ticket #18413: 18413.diff

File 18413.diff, 789 bytes (added by timo, 22 months ago)
Line 
1diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
2index 4797e8b..1d8386a 100644
3--- a/docs/ref/models/fields.txt
4+++ b/docs/ref/models/fields.txt
5@@ -668,6 +668,12 @@ the field. Note: This method will close the file if it happens to be open when
6 The optional ``save`` argument controls whether or not the instance is saved
7 after the file has been deleted. Defaults to ``True``.
8 
9+Note that when a model is deleted, the :class:`~django.db.models.FileField`'s
10+:func:`~django.db.models.FileField.delete` method won't be called.  If you need
11+to cleanup orphaned files, you'll need to handle it yourself (for instance,
12+with a custom management command that can be run manually or scheduled to run
13+periodically via e.g. cron).
14+
15 ``FilePathField``
16 -----------------
17