blob: 206e456790c3b88329e66ee34bd4faf1aa6e05f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
from django.conf import settings
from storages.backends.s3boto3 import S3Boto3Storage
class StaticStorage(S3Boto3Storage):
if settings.USE_AWS:
location = settings.AWS_STATIC_LOCATION
else:
pass
class PublicMediaStorage(S3Boto3Storage):
if settings.USE_AWS:
location = settings.AWS_PUBLIC_MEDIA_LOCATION
file_overwrite = True
default_acl = 'public-read'
else:
pass
|