Skip to content

Commit 6adf476

Browse files
committed
splitting into files for better reference?
1 parent 5e0a30d commit 6adf476

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

museum_of_dreams_project/settings/aws.py

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from .base import *
2-
from storages.backends.s3boto3 import S3Boto3Storage
32

43

54
SECRET_KEY = os.environ.get("SECRET_KEY")
@@ -30,16 +29,8 @@
3029
AWS_QUERYSTRING_AUTH = False # needed by grappelli to work with s3
3130

3231

33-
class StaticStorage(S3Boto3Storage):
34-
location = STATIC_ROOT
35-
36-
37-
class MediaStorage(S3Boto3Storage):
38-
location = MEDIA_ROOT
39-
40-
41-
DEFAULT_FILE_STORAGE = "MediaStorage"
42-
STATICFILES_STORAGE = "StaticStorage"
32+
DEFAULT_FILE_STORAGE = "static.MediaStorage"
33+
STATICFILES_STORAGE = "static.StaticStorage"
4334

4435
AWS_ACCESS_KEY_ID = os.environ["AWS_ACCESS_KEY_ID"]
4536
AWS_SECRET_ACCESS_KEY = os.environ["AWS_SECRET_ACCESS_KEY"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from storages.backends.s3boto3 import S3Boto3Storage
2+
import aws
3+
4+
5+
class StaticStorage(S3Boto3Storage):
6+
location = aws.STATIC_ROOT
7+
8+
9+
class MediaStorage(S3Boto3Storage):
10+
location = aws.MEDIA_ROOT

0 commit comments

Comments
 (0)