1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #28184 -- Allowed using a callable for FileField and ImageField storage.

This commit is contained in:
miigotu
2020-03-31 12:12:39 +02:00
committed by Carlton Gibson
parent db6933a032
commit 210657b791
7 changed files with 105 additions and 4 deletions

View File

@@ -248,6 +248,11 @@ File Storage
* ``FileSystemStorage.save()`` method now supports :class:`pathlib.Path`.
* :class:`~django.db.models.FileField` and
:class:`~django.db.models.ImageField` now accept a callable for ``storage``.
This allows you to modify the used storage at runtime, selecting different
storages for different environments, for example.
File Uploads
~~~~~~~~~~~~