Skip to content

Instantly share code, notes, and snippets.

@lemoonbox
Created March 5, 2015 10:32
Show Gist options
  • Save lemoonbox/1bdcd3b6c90a64c4dba2 to your computer and use it in GitHub Desktop.
Save lemoonbox/1bdcd3b6c90a64c4dba2 to your computer and use it in GitHub Desktop.
if DEBUG :
#local_static
STATIC_URL = '/static/'
STATICFILES_DIRS=(os.path.join(BASE_DIR, 'static_local'),)
#local_media
MEDIA_ROOT = os.path.join(BASE_DIR, 'uploads')
MEDIA_URL = '/userphoto/media/'
else :
STATICFILES_DIRS=(os.path.join(BASE_DIR, 'static_local'),)
AWS_S3_CUSTOM_DOMAIN = '%s.s3.amazonaws.com' % AWS_STORAGE_BUCKET_NAME
STATICFILES_LOCATION = 'static'
STATICFILES_STORAGE = 'DIY_tool.custom_storages.StaticStorage'
#STATIC_URL = "https://%s/" % AWS_S3_CUSTOM_DOMAIN
MEDIAFILES_LOCATION = 'uploads'
DEFAULT_FILE_STORAGE = 'DIY_tool.custom_storages.MediaStorage'
MEDIA_URL = "https://%s/uploads/" % AWS_S3_CUSTOM_DOMAIN
#
SUMMERNOTE_CONFIG = {
'attachment_upload_to': os.path.join(BASE_DIR, 'uploads'),
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment