From 210657b791fec359a9109b69e566018253edfad0 Mon Sep 17 00:00:00 2001 From: miigotu Date: Tue, 31 Mar 2020 12:12:39 +0200 Subject: Fixed #28184 -- Allowed using a callable for FileField and ImageField storage. --- docs/ref/models/fields.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'docs/ref') diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 7c5401046b..7ca0b96d85 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -822,8 +822,13 @@ Has two optional arguments: .. attribute:: FileField.storage - A storage object, which handles the storage and retrieval of your - files. See :doc:`/topics/files` for details on how to provide this object. + A storage object, or a callable which returns a storage object. This + handles the storage and retrieval of your files. See :doc:`/topics/files` + for details on how to provide this object. + + .. versionchanged:: 3.1 + + The ability to provide a callable was added. The default form widget for this field is a :class:`~django.forms.ClearableFileInput`. -- cgit v1.3