fix default settings module name at some places

note: in production, you will usually have to specify an OWN module (like local_settings) that imports from nsupdate.settings.prod and then overrides whatever you need to be different
This commit is contained in:
Thomas Waldmann 2013-12-15 17:16:04 +01:00
parent 0df4efce1c
commit e18b725096
3 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ PIDFILE=/srv/nsupdate/run/gunicorn.pid
USER=www-data # the user to run as
GROUP=www-data # the group to run as
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn
DJANGO_SETTINGS_MODULE=nsupdate.settings # which settings file should Django use
DJANGO_SETTINGS_MODULE=nsupdate.settings.dev # which settings file should Django use
DJANGO_WSGI_MODULE=nsupdate.wsgi # WSGI module name
echo "Starting $NAME"

View File

@ -4,6 +4,6 @@ import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nsupdate.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nsupdate.settings.dev")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)

View File

@ -18,8 +18,8 @@ import os
# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
# if running multiple sites in the same mod_wsgi process. To fix this, use
# mod_wsgi daemon mode with each site in its own daemon process, or use
# os.environ["DJANGO_SETTINGS_MODULE"] = "nsupdate.settings"
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nsupdate.settings")
# os.environ["DJANGO_SETTINGS_MODULE"] = "nsupdate.settings.dev"
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nsupdate.settings.dev")
# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION