File tree 2 files changed +4
-3
lines changed
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.
68
68
69
69
The ``ClearableFileInput `` widget is only than automatically replaced
70
70
when the ``DEFAULT_FILE_STORAGE `` setting is set to
71
- ``django-storages ``\ ’ ``S3Boto3Storage ``.
71
+ ``django-storages ``\ ’ ``S3Boto3Storage `` or the dummy ``FileSystemStorage ``
72
+ is enabled.
72
73
73
74
Setting up the AWS S3 bucket
74
75
----------------------------
Original file line number Diff line number Diff line change @@ -10,12 +10,12 @@ class S3FileConfig(AppConfig):
10
10
11
11
def ready (self ):
12
12
from django import forms
13
- from django .core .files .storage import default_storage
13
+ from django .core .files .storage import FileSystemStorage , default_storage
14
14
from storages .backends .s3boto3 import S3Boto3Storage
15
15
16
16
from .forms import S3FileInputMixin
17
17
18
- if isinstance (default_storage , S3Boto3Storage ) and \
18
+ if isinstance (default_storage , ( S3Boto3Storage , FileSystemStorage ) ) and \
19
19
S3FileInputMixin not in forms .ClearableFileInput .__bases__ :
20
20
forms .ClearableFileInput .__bases__ = \
21
21
(S3FileInputMixin ,) + forms .ClearableFileInput .__bases__
You can’t perform that action at this time.
0 commit comments