Loading django/conf/project_template/project_name/wsgi.py +4 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,10 @@ framework. """ 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"] = "{{ project_name }}.settings" os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") # This application object is used by any WSGI server configured to use this Loading docs/howto/deployment/wsgi/modwsgi.txt +11 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,15 @@ for you; otherwise, you'll need to create it. See the :doc:`WSGI overview documentation</howto/deployment/wsgi/index>` for the default contents you should put in this file, and what else you can add to it. .. warning:: If multiple Django sites are run in a single mod_wsgi process, all of them will use the settings of whichever one happens to run first. This can be solved with a minor edit to ``wsgi.py`` (see comment in the file for details), or by :ref:`using mod_wsgi daemon mode<daemon-mode>` and ensuring that each site runs in its own daemon process. Using a virtualenv ================== Loading @@ -71,6 +80,8 @@ Make sure you give the correct path to your virtualenv, and replace .. _virtualenv: http://www.virtualenv.org .. _daemon-mode: Using mod_wsgi daemon mode ========================== Loading Loading
django/conf/project_template/project_name/wsgi.py +4 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,10 @@ framework. """ 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"] = "{{ project_name }}.settings" os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") # This application object is used by any WSGI server configured to use this Loading
docs/howto/deployment/wsgi/modwsgi.txt +11 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,15 @@ for you; otherwise, you'll need to create it. See the :doc:`WSGI overview documentation</howto/deployment/wsgi/index>` for the default contents you should put in this file, and what else you can add to it. .. warning:: If multiple Django sites are run in a single mod_wsgi process, all of them will use the settings of whichever one happens to run first. This can be solved with a minor edit to ``wsgi.py`` (see comment in the file for details), or by :ref:`using mod_wsgi daemon mode<daemon-mode>` and ensuring that each site runs in its own daemon process. Using a virtualenv ================== Loading @@ -71,6 +80,8 @@ Make sure you give the correct path to your virtualenv, and replace .. _virtualenv: http://www.virtualenv.org .. _daemon-mode: Using mod_wsgi daemon mode ========================== Loading