mirror of
https://github.com/django/django.git
synced 2024-12-23 17:46:27 +00:00
Fixes #15588 -- 1.3 release documentation for FileField no longer deleting files unclear. Thanks for the patch, Philip Neustrom.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16205 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
396bc58889
commit
39517438e0
@ -358,19 +358,20 @@ issues reported to us, however, query string lookup arguments in the
|
|||||||
admin must be for fields or relations specified in ``list_filter`` or
|
admin must be for fields or relations specified in ``list_filter`` or
|
||||||
``date_hierarchy``.
|
``date_hierarchy``.
|
||||||
|
|
||||||
FileField no longer deletes files
|
Deleting a model doesn't delete associated files
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
In earlier Django versions, when a model instance containing a
|
In earlier Django versions, when a model instance containing a
|
||||||
:class:`~django.db.models.FileField` was deleted,
|
:class:`~django.db.models.FileField` was deleted,
|
||||||
:class:`~django.db.models.FileField` took it upon itself to also delete the
|
:class:`~django.db.models.FileField` took it upon itself to also delete the
|
||||||
file from the backend storage. This opened the door to several data-loss
|
file from the backend storage. This opened the door to several data-loss
|
||||||
scenarios, including rolled-back transactions and fields on different models
|
scenarios, including rolled-back transactions and fields on different models
|
||||||
referencing the same file. In Django 1.3, :class:`~django.db.models.FileField`
|
referencing the same file. In Django 1.3, when a model is deleted the
|
||||||
will never delete files from the backend storage. If you need cleanup of
|
:class:`~django.db.models.FileField`'s
|
||||||
orphaned files, you'll need to handle it yourself (for instance, with a custom
|
:func:`~django.db.models.FileField.delete` method won't be called. If you
|
||||||
management command that can be run manually or scheduled to run periodically
|
need cleanup of orphaned files, you'll need to handle it yourself (for
|
||||||
via e.g. cron).
|
instance, with a custom management command that can be run manually or
|
||||||
|
scheduled to run periodically via e.g. cron).
|
||||||
|
|
||||||
PasswordInput default rendering behavior
|
PasswordInput default rendering behavior
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
Loading…
Reference in New Issue
Block a user