Skip to content

change variables since settings.main used by manage.py uses DJANGO_*#66

Open
ecstt wants to merge 1 commit into
wger-project:masterfrom
ecstt:from-source-edit
Open

change variables since settings.main used by manage.py uses DJANGO_*#66
ecstt wants to merge 1 commit into
wger-project:masterfrom
ecstt:from-source-edit

Conversation

@ecstt

@ecstt ecstt commented Jul 2, 2026

Copy link
Copy Markdown

About installing from source:
the minimal example suggests in the env:

# Application
MEDIA_ROOT=/home/wger/media
STATIC_ROOT=/home/wger/static

when using a different user than the suggested new 'wger' user and importing the wger.env for bootstrap command with
set -a; . /home/<non_default_folder>/wger.env; set +a
then checking the env:
manage.py diffsettings | grep MEDIA_ROOT
shows the value of 'MEDIA_ROOT' (and 'STATIC_ROOT') as not changed from the default used in settings.main.

In settings.main MEDIA_ROOT and STATIC_ROOT are:

MEDIA_ROOT = env.str('DJANGO_MEDIA_ROOT', '/home/wger/media')
STATIC_ROOT = env.str('DJANGO_STATIC_ROOT', '/home/wger/static')

so DJANGO_* is required to overwrite the values.
Running python manage.py collectstatic without this change in the env gave me an error since it tried to access the non existent /home/wger folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant