Django

Code

Changeset 2789

Show
Ignore:
Timestamp:
04/28/06 22:02:10 (2 years ago)
Author:
adrian
Message:

magic-removal: Proofread docs/settings.txt

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/magic-removal/docs/settings.txt

    r2744 r2789  
    2020Because a settings file is a Python module, the following apply: 
    2121 
    22     * It shouldn't have Python syntax errors. 
     22    * It doesn't allow for Python syntax errors. 
    2323    * It can assign settings dynamically using normal Python syntax. 
    2424      For example:: 
     
    3535 
    3636The value of ``DJANGO_SETTINGS_MODULE`` should be in Python path syntax, e.g. 
    37 ``"myproject.settings"``. Note that the settings module should be on the 
     37``mysite.settings``. Note that the settings module should be on the 
    3838Python `import search path`_. 
    3939 
     
    4848Example (Unix Bash shell):: 
    4949 
    50     export DJANGO_SETTINGS_MODULE=myproject.settings 
     50    export DJANGO_SETTINGS_MODULE=mysite.settings 
    5151    django-admin.py runserver 
    5252 
    5353Example (Windows shell):: 
    5454 
    55     set DJANGO_SETTINGS_MODULE=myproject.settings 
     55    set DJANGO_SETTINGS_MODULE=mysite.settings 
    5656    django-admin.py runserver 
    5757 
    5858Use the ``--settings`` command-line argument to specify the settings manually:: 
    5959 
    60     django-admin.py runserver --settings=myproject.settings 
     60    django-admin.py runserver --settings=mysite.settings 
    6161 
    6262.. _django-admin.py: http://www.djangoproject.com/documentation/django_admin/ 
     
    7171        SetHandler python-program 
    7272        PythonHandler django.core.handlers.modpython 
    73         SetEnv DJANGO_SETTINGS_MODULE myproject.settings 
     73        SetEnv DJANGO_SETTINGS_MODULE mysite.settings 
    7474    </Location> 
    7575 
     
    119119your own settings file. ``django.conf.settings`` abstracts the concepts of 
    120120default settings and site-specific settings; it presents a single interface. 
     121It also decouples the code that uses settings from the location of your 
     122settings. 
    121123 
    122124Altering settings at runtime 
     
    641643highlighted. 
    642644 
    643 Note that Django only displays fancy error pages if ``DEBUG`` is ``True``, so you'll 
    644 want to set that to take advantage of this setting. 
     645Note that Django only displays fancy error pages if ``DEBUG`` is ``True``, so 
     646you'll want to set that to take advantage of this setting. 
    645647 
    646648See also DEBUG.