diff options
| author | miigotu <miigotu@gmail.com> | 2020-03-31 12:12:39 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton@noumenal.es> | 2020-04-08 11:26:17 +0200 |
| commit | 210657b791fec359a9109b69e566018253edfad0 (patch) | |
| tree | d9bb41fcd6aae39772ac373697834b24f5193524 /docs/ref | |
| parent | db6933a032c850153a688b6c977691b37ca02745 (diff) | |
Fixed #28184 -- Allowed using a callable for FileField and ImageField storage.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/models/fields.txt | 9 |
1 files changed, 7 insertions, 2 deletions
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`. |
