Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jgram925/92d096c50198f9bd80f31267b36d12bb to your computer and use it in GitHub Desktop.
Save jgram925/92d096c50198f9bd80f31267b36d12bb to your computer and use it in GitHub Desktop.
Virtualenvwrapper: Set Django Settings Module
# envs/<project_name>/bin/postactivate
export DJANGO_SETTINGS_MODULE=<project_name>.<settings_folder_name>.<settings_file_name>
# envs/<project_name>/bin/postdeactivate
unset DJANGO_SETTINGS_MODULE
# IF using supervisord to run gunicorn, need to set environment variable in supervisord.conf
environment=DJANGO_SETTINGS_MODULE=<project_name>.<settings_folder_name>.<settings_file_name>
# Check that the DJANGO_SETTINGS_MODULE is set correctly from BASH
echo $DJANGO_SETTINGS_MODULE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment