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:
parent
0df4efce1c
commit
e18b725096
@ -9,7 +9,7 @@ PIDFILE=/srv/nsupdate/run/gunicorn.pid
|
|||||||
USER=www-data # the user to run as
|
USER=www-data # the user to run as
|
||||||
GROUP=www-data # the group to run as
|
GROUP=www-data # the group to run as
|
||||||
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn
|
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
|
DJANGO_WSGI_MODULE=nsupdate.wsgi # WSGI module name
|
||||||
|
|
||||||
echo "Starting $NAME"
|
echo "Starting $NAME"
|
||||||
|
@ -4,6 +4,6 @@ import sys
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
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
|
from django.core.management import execute_from_command_line
|
||||||
execute_from_command_line(sys.argv)
|
execute_from_command_line(sys.argv)
|
||||||
|
@ -18,8 +18,8 @@ import os
|
|||||||
# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
|
# 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
|
# 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
|
# mod_wsgi daemon mode with each site in its own daemon process, or use
|
||||||
# os.environ["DJANGO_SETTINGS_MODULE"] = "nsupdate.settings"
|
# os.environ["DJANGO_SETTINGS_MODULE"] = "nsupdate.settings.dev"
|
||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nsupdate.settings")
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nsupdate.settings.dev")
|
||||||
|
|
||||||
# This application object is used by any WSGI server configured to use this
|
# This application object is used by any WSGI server configured to use this
|
||||||
# file. This includes Django's development server, if the WSGI_APPLICATION
|
# file. This includes Django's development server, if the WSGI_APPLICATION
|
||||||
|
Loading…
x
Reference in New Issue
Block a user