Skip to content

Commit

Permalink
fix media and static settings to adopt with geonode settings
Browse files Browse the repository at this point in the history
and use environment variables
  • Loading branch information
ahmednoureldeen committed Apr 12, 2021
1 parent a295c1a commit a67983f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cartoview/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,10 @@
'cartoview.app_manager.context_processors.site_logo')
TEMPLATES[0]["OPTIONS"]['context_processors'] += CARTOVIEW_CONTEXT_PROCESSORS
# django Media Section
# uncomment the following if you want your files out of geonode folder
MEDIA_ROOT = os.path.join(BASE_DIR, "uploaded")
MEDIA_URL = "/uploaded/"
LOCAL_MEDIA_URL = "/uploaded/"
MEDIA_ROOT = os.getenv('MEDIA_ROOT', os.path.join(BASE_DIR, MEDIAFILES_LOCATION))

# static section
STATIC_ROOT = os.getenv('STATIC_ROOT', os.path.join(BASE_DIR, "static"))
STATIC_ROOT = os.getenv('STATIC_ROOT', os.path.join(BASE_DIR, STATICFILES_LOCATION))

DATABASE_URL = os.getenv(
'DATABASE_URL', 'sqlite:////{}/database.sqlite'.format(
Expand Down

0 comments on commit a67983f

Please sign in to comment.