File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 4
4
5
5
class StaticStorage (S3Boto3Storage ):
6
6
location = settings .STATICFILES_LOCATION
7
+
8
+
9
+ class MediaStorage (S3Boto3Storage ):
10
+ location = settings .MEDIAFILES_LOCATION
Original file line number Diff line number Diff line change 152
152
153
153
# STATIC_ROOT = (os.path.join(BASE_DIR, 'staticfiles'))
154
154
155
- MESSAGE_STORAGE = "django.contrib.messages.storage.session.SessionStorage"
156
-
157
- TAGGIT_CASE_INSENSITIVE = True
155
+ MEDIAFILES_LOCATION = 'media'
156
+ DEFAULT_FILE_STORAGE = 'custom_storages.MediaStorage'
158
157
159
158
MEDIA_ROOT = os .path .join (BASE_DIR , 'media' )
160
- MEDIA_URL = '/media/'
159
+ MEDIA_URL = "https://%s/%s/" % ( AWS_S3_CUSTOM_DOMAIN , MEDIAFILES_LOCATION )
161
160
162
161
CRISPY_TEMPLATE_PACK = 'bootstrap4'
163
162
164
163
STRIPE_PUBLISHABLE = os .getenv ('STRIPE_PUBLISHABLE' )
165
164
STRIPE_SECRET = os .getenv ('STRIPE_SECRET' )
166
165
166
+ TAGGIT_CASE_INSENSITIVE = True
167
+
168
+ MESSAGE_STORAGE = "django.contrib.messages.storage.session.SessionStorage"
167
169
MESSAGE_TAGS = {
168
170
messages .DEBUG : 'alert-info' ,
169
171
messages .INFO : 'alert-info' ,
You can’t perform that action at this time.
0 commit comments