Changeset 2789
- Timestamp:
- 04/28/06 22:02:10 (2 years ago)
- Files:
-
- django/branches/magic-removal/docs/settings.txt (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/magic-removal/docs/settings.txt
r2744 r2789 20 20 Because a settings file is a Python module, the following apply: 21 21 22 * It shouldn't havePython syntax errors.22 * It doesn't allow for Python syntax errors. 23 23 * It can assign settings dynamically using normal Python syntax. 24 24 For example:: … … 35 35 36 36 The value of ``DJANGO_SETTINGS_MODULE`` should be in Python path syntax, e.g. 37 `` "myproject.settings"``. Note that the settings module should be on the37 ``mysite.settings``. Note that the settings module should be on the 38 38 Python `import search path`_. 39 39 … … 48 48 Example (Unix Bash shell):: 49 49 50 export DJANGO_SETTINGS_MODULE=my project.settings50 export DJANGO_SETTINGS_MODULE=mysite.settings 51 51 django-admin.py runserver 52 52 53 53 Example (Windows shell):: 54 54 55 set DJANGO_SETTINGS_MODULE=my project.settings55 set DJANGO_SETTINGS_MODULE=mysite.settings 56 56 django-admin.py runserver 57 57 58 58 Use the ``--settings`` command-line argument to specify the settings manually:: 59 59 60 django-admin.py runserver --settings=my project.settings60 django-admin.py runserver --settings=mysite.settings 61 61 62 62 .. _django-admin.py: http://www.djangoproject.com/documentation/django_admin/ … … 71 71 SetHandler python-program 72 72 PythonHandler django.core.handlers.modpython 73 SetEnv DJANGO_SETTINGS_MODULE my project.settings73 SetEnv DJANGO_SETTINGS_MODULE mysite.settings 74 74 </Location> 75 75 … … 119 119 your own settings file. ``django.conf.settings`` abstracts the concepts of 120 120 default settings and site-specific settings; it presents a single interface. 121 It also decouples the code that uses settings from the location of your 122 settings. 121 123 122 124 Altering settings at runtime … … 641 643 highlighted. 642 644 643 Note that Django only displays fancy error pages if ``DEBUG`` is ``True``, so you'll644 want to set that to take advantage of this setting.645 Note that Django only displays fancy error pages if ``DEBUG`` is ``True``, so 646 you'll want to set that to take advantage of this setting. 645 647 646 648 See also DEBUG.
