diff --git a/envs/common.py b/envs/common.py index 6a21fafc7181a8440a9e26b378697f8ae58debfa..0f14637b78434110f1c807a2095e461a7b5cba9f 100644 --- a/envs/common.py +++ b/envs/common.py @@ -135,13 +135,13 @@ STATIC_ROOT = ENV_ROOT / "staticfiles" # We don't run collectstatic -- this is t # FIXME: We should iterate through the courses we have, adding the static # contents for each of them. (Right now we just use symlinks.) -STATICFILES_DIRS = ( +STATICFILES_DIRS = [ PROJECT_ROOT / "static", ASKBOT_ROOT / "askbot" / "skins", # This is how you would use the textbook images locally # ("book", ENV_ROOT / "book_images") -) +] # Locale/Internationalization TIME_ZONE = 'America/New_York' # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name diff --git a/envs/dev.py b/envs/dev.py index 1a62eaf3824f0effb5a535c86fc73a4f6342966f..52796d1c427de05ff7bc25bf24b1ae8a32ef25b2 100644 --- a/envs/dev.py +++ b/envs/dev.py @@ -73,7 +73,8 @@ DEBUG_TOOLBAR_PANELS = ( ############################ FILE UPLOADS (ASKBOT) ############################# DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' MEDIA_ROOT = ENV_ROOT / "uploads" -MEDIA_URL = "/discussion/upfiles/" +MEDIA_URL = "/static/uploads/" +STATICFILES_DIRS.append(("uploads", MEDIA_ROOT)) FILE_UPLOAD_TEMP_DIR = ENV_ROOT / "uploads" FILE_UPLOAD_HANDLERS = ( 'django.core.files.uploadhandler.MemoryFileUploadHandler',