django-storages
django-storages copied to clipboard
How to create TenantFileSystemStorage in ASW s3 bucket storage.
According django-tenant-schemas doc and django storages doc . Those two package recomendated to use same variable named DEFAULT_FILE_STORAGE
within settings.py
How to create tenant_schemas.storage.TenantFileSystemStorage within AWS s3 bucket with django-storages 1.12.3
# for TenantFileSystemStorage
DEFAULT_FILE_STORAGE = 'tenant_schemas.storage.TenantFileSystemStorage'
# for s3 bucket django-storages
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
requirements.txt
asgiref==3.4.1
autopep8==1.5.7
boto3==1.19.12
certifi==2021.5.30
charset-normalizer==2.0.6
coreapi==2.3.3
coreschema==0.0.4
Django==3.2.6
django-braces==1.14.0
django-cors-headers==3.8.0
django-crispy-forms==1.12.0
django-debug-toolbar==3.2.4
django-storages==1.12.3
django-tenant-schemas==1.11.0
djangorestframework==3.12.4
djangorestframework-simplejwt==4.7.2
drf-yasg==1.20.0
gevent==21.12.0
gunicorn==20.1.0
idna==3.2
inflection==0.5.1
itypes==1.2.0
Jinja2==3.0.1
MarkupSafe==2.0.1
ordered-set==4.0.2
packaging==21.0
Pillow==8.3.1
psycopg2-binary==2.9.1
pycodestyle==2.7.0
PyJWT==2.1.0
pyparsing==2.4.7
pytz==2021.1
requests==2.26.0
ruamel.yaml==0.17.16
ruamel.yaml.clib==0.2.6
six==1.16.0
sqlparse==0.4.1
toml==0.10.2
uritemplate==3.0.1
urllib3==1.26.7
@MdNazmul9 hey, did you manage to make it work?
From the tenant docs it looks like you should subclass the backend of your choice and mix in TenantStorageMixin
and configure that as your backend of choice.