Changes needed for Askbot S3
This commit is contained in:
@@ -34,6 +34,10 @@ HTTPS = 'on'
|
||||
MEDIA_URL = ''
|
||||
MEDIA_ROOT = ''
|
||||
|
||||
# Needed for Askbot
|
||||
# Deployed machines: Move to S3
|
||||
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
|
||||
|
||||
DEBUG = True
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
@@ -251,13 +255,15 @@ import site
|
||||
|
||||
STATICFILES_DIRS = STATICFILES_DIRS + ( ASKBOT_DIR+'/askbot/skins',)
|
||||
|
||||
# Needed for Askbot
|
||||
# Critical TODO: Move to S3
|
||||
MEDIA_URL = '/discussion/upfiles/'
|
||||
MEDIA_ROOT = ASKBOT_DIR+'/askbot/upfiles'
|
||||
|
||||
ASKBOT_ROOT = os.path.dirname(askbot.__file__)
|
||||
|
||||
# Needed for Askbot
|
||||
# Deployed machines: Move to S3
|
||||
if MEDIA_ROOT == '':
|
||||
MEDIA_ROOT = ASKBOT_DIR+'/askbot/upfiles'
|
||||
if MEDIA_URL == '':
|
||||
MEDIA_URL = '/discussion/upfiles/'
|
||||
|
||||
site.addsitedir(os.path.join(os.path.dirname(askbot.__file__), 'deps'))
|
||||
TEMPLATE_LOADERS = TEMPLATE_LOADERS + ('askbot.skins.loaders.filesystem_load_template_source',)
|
||||
|
||||
@@ -281,7 +287,6 @@ FILE_UPLOAD_HANDLERS = (
|
||||
ASKBOT_ALLOWED_UPLOAD_FILE_TYPES = ('.jpg', '.jpeg', '.gif', '.bmp', '.png', '.tiff')
|
||||
ASKBOT_MAX_UPLOAD_FILE_SIZE = 1024 * 1024 #result in bytes
|
||||
# ASKBOT_FILE_UPLOAD_DIR = os.path.join(os.path.dirname(__file__), 'askbot', 'upfiles')
|
||||
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
|
||||
|
||||
PROJECT_ROOT = os.path.dirname(__file__)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user