Skip to content

Commit

Permalink
Update MEDIA_ROOT and STATIC_ROOT
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash-Crow committed Jan 3, 2024
1 parent 0717805 commit dc33116
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ HOST_URL=localhost # use 0.0.0.0 for Docker
ALLOWED_HOSTS=localhost, 0.0.0.0
HOST_PORT=8000
SITE_NAME=Gestionnaire de contenus
MEDIA_ROOT=

USE_DOCKER=0 # Set 1 to use Docker

Expand Down
3 changes: 2 additions & 1 deletion config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,14 @@
else:
DEFAULT_FILE_STORAGE = "django.core.files.storage.FileSystemStorage"
MEDIA_URL = "medias/"
MEDIA_ROOT = os.path.join(BASE_DIR, os.getenv("MEDIA_ROOT", ""))

# Django Sass
SASS_PROCESSOR_ROOT = os.path.join(BASE_DIR, "static/css")
SASS_PROCESSOR_AUTO_INCLUDE = False

STATIC_URL = "static/"
STATIC_ROOT = "staticfiles"
STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")

STATICFILES_DIRS = (os.path.join(BASE_DIR, "static"),)

Expand Down

0 comments on commit dc33116

Please sign in to comment.