Changeset - 655360c2fbaa
[Not reviewed]
0 2 0
Branko Majic (branko) - 10 years ago 2015-09-07 20:42:14
branko@majic.rs
MDT-1: Do not auto-import the development environment settings. This messes with the other stuff. Updated docs to reflect this, and pointed users to DJANGO_SETTINGS_MODULE environment variable instead.
2 files changed with 2 insertions and 11 deletions:
0 comments (0 inline, 0 general)
docs/usage.rst
Show inline comments
 
@@ -54,11 +54,6 @@ files are present:
 
  environment. You should be very careful not to mess this file up, and make
 
  sure that things like debugging etc are turned off (unless you really, really
 
  need it in development environment).
 
* ``__init__.py`` is a convenience script used to automatically import the
 
  development environment settings if no specific project configuration is
 
  passed on to the WSGI application. For example, if you simply run ``manage.py
 
  runserver`` without specifying environment configuration explicitly, it will
 
  automatically fall back to using the development settings.
 

	
 
There is very little in special variables used in the listed configuration
 
files. You can practically specify any Django or Django application
 
@@ -117,7 +112,5 @@ of the following commands (depending on which environment you want to run)::
 
  python manage.py runserver --settings your_project_name.settings.testing
 
  python manage.py runserver --settings your_project_name.settings.production
 

	
 
As mentioned before, the following will default to running the Django
 
development server using the development settings::
 

	
 
  python manage.py runserver
 
If using ``virtualenv``, you may want to set the ``DJANGO_SETTINGS_MODULE``
 
environment variable in it to make your life easier.
project/project_name/settings/__init__.py
Show inline comments
 
# Run the development site by default.
 
from .development import *
0 comments (0 inline, 0 general)