File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,8 @@ you do not need to alter your code at all.
6868
6969The ``ClearableFileInput`` widget is only than automatically replaced
7070when the ``DEFAULT_FILE_STORAGE`` setting is set to
71- ``django-storages``\ ’ ``S3Boto3Storage``.
71+ ``django-storages``\ ’ ``S3Boto3Storage`` or the dummy ``FileSystemStorage``
72+ is enabled.
7273
7374Setting up the AWS S3 bucket
7475----------------------------
Original file line number Diff line number Diff line change @@ -10,12 +10,12 @@ class S3FileConfig(AppConfig):
1010
1111 def ready(self):
1212 from django import forms
13- from django.core.files.storage import default_storage
13+ from django.core.files.storage import FileSystemStorage, default_storage
1414 from storages.backends.s3boto3 import S3Boto3Storage
1515
1616 from .forms import S3FileInputMixin
1717
18- if isinstance(default_storage, S3Boto3Storage) and \
18+ if isinstance(default_storage, ( S3Boto3Storage, FileSystemStorage) ) and \
1919 S3FileInputMixin not in forms.ClearableFileInput.__bases__:
2020 forms.ClearableFileInput.__bases__ = \
2121 (S3FileInputMixin,) + forms.ClearableFileInput.__bases__
You can’t perform that action at this time.
0 commit comments