diff options
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/clickjacking.txt | 6 | ||||
| -rw-r--r-- | docs/ref/contrib/admin/index.txt | 8 | ||||
| -rw-r--r-- | docs/ref/contrib/gis/tutorial.txt | 3 | ||||
| -rw-r--r-- | docs/ref/contrib/sites.txt | 24 | ||||
| -rw-r--r-- | docs/ref/django-admin.txt | 4 | ||||
| -rw-r--r-- | docs/ref/settings.txt | 19 |
6 files changed, 46 insertions, 18 deletions
diff --git a/docs/ref/clickjacking.txt b/docs/ref/clickjacking.txt index e3d1bfc87b..40b42d1ac7 100644 --- a/docs/ref/clickjacking.txt +++ b/docs/ref/clickjacking.txt @@ -51,7 +51,7 @@ How to use it Setting X-Frame-Options for all responses ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -To set the same X-Frame-Options value for all responses in your site, add +To set the same X-Frame-Options value for all responses in your site, put ``'django.middleware.clickjacking.XFrameOptionsMiddleware'`` to :setting:`MIDDLEWARE_CLASSES`:: @@ -61,6 +61,10 @@ To set the same X-Frame-Options value for all responses in your site, add ... ) +.. versionchanged:: 1.6 + This middleware is enabled in the settings file generated by + :djadmin:`startproject`. + By default, the middleware will set the X-Frame-Options header to SAMEORIGIN for every outgoing ``HttpResponse``. If you want DENY instead, set the :setting:`X_FRAME_OPTIONS` setting:: diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index 1b47fa8828..3f32d3bce4 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -14,7 +14,13 @@ Django's admin interface. Overview ======== -There are seven steps in activating the Django admin site: +The admin is enabled in the default project template used by +:djadmin:`startproject`. + +.. versionchanged:: 1.6 + In previous versions, the admin wasn't enabled by default. + +For reference, here are the requirements: 1. Add ``'django.contrib.admin'`` to your :setting:`INSTALLED_APPS` setting. diff --git a/docs/ref/contrib/gis/tutorial.txt b/docs/ref/contrib/gis/tutorial.txt index 9efa020e61..56d90c8593 100644 --- a/docs/ref/contrib/gis/tutorial.txt +++ b/docs/ref/contrib/gis/tutorial.txt @@ -115,13 +115,12 @@ In addition, modify the :setting:`INSTALLED_APPS` setting to include and ``world`` (your newly created application):: INSTALLED_APPS = ( + 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', - 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', - 'django.contrib.admin', 'django.contrib.gis', 'world' ) diff --git a/docs/ref/contrib/sites.txt b/docs/ref/contrib/sites.txt index 7e5448b3d3..7eaab5dacf 100644 --- a/docs/ref/contrib/sites.txt +++ b/docs/ref/contrib/sites.txt @@ -247,13 +247,29 @@ To do this, you can use the sites framework. A simple example:: 'http://example.com/mymodel/objects/3/' -Default site and ``syncdb`` -=========================== +Enabling the sites framework +============================ + +.. versionchanged:: 1.6 + In previous versions, the sites framework was enabled by default. + +To enable the sites framework, follow these steps: + +1. Add ``'django.contrib.sites'`` to your :setting:`INSTALLED_APPS` + setting. + +2. Define a :setting:`SITE_ID` setting:: + + SITE_ID = 1 + +3. Run :djadmin:`syncdb`. ``django.contrib.sites`` registers a :data:`~django.db.models.signals.post_syncdb` signal handler which creates a -default site named ``example.com`` with the domain ``example.com``. For -example, this site will be created after Django creates the test database. +default site named ``example.com`` with the domain ``example.com``. This site +will also be created after Django creates the test database. To set the +correct name and domain for your project, you can use an :doc:`initial data +fixture </howto/initial-data>`. Caching the current ``Site`` object =================================== diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 4074495b9a..bde4ec6c82 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -921,6 +921,8 @@ For example:: django-admin.py startapp myapp /Users/jezdez/Code/myapp +.. _custom-app-and-project-templates: + .. django-admin-option:: --template With the ``--template`` option, you can use a custom app template by providing @@ -952,6 +954,7 @@ with the ``--name`` option. The :class:`template context options) - ``app_name`` -- the app name as passed to the command - ``app_directory`` -- the full path of the newly created app +- ``docs_version`` -- the version of the documentation: ``'dev'`` or ``'1.x'`` .. _render_warning: @@ -1021,6 +1024,7 @@ with the ``--name`` option. The :class:`template context - ``project_name`` -- the project name as passed to the command - ``project_directory`` -- the full path of the newly created project - ``secret_key`` -- a random key for the :setting:`SECRET_KEY` setting +- ``docs_version`` -- the version of the documentation: ``'dev'`` or ``'1.x'`` Please also see the :ref:`rendering warning <render_warning>` as mentioned for :djadmin:`startapp`. diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index d057323c06..affa805bc4 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -1134,9 +1134,12 @@ LANGUAGE_CODE Default: ``'en-us'`` -A string representing the language code for this installation. This should be in -standard :term:`language format<language code>`. For example, U.S. English is -``"en-us"``. See :doc:`/topics/i18n/index`. +A string representing the language code for this installation. This should be +in standard :term:`language format<language code>`. For example, U.S. English +is ``"en-us"``. See also the `list of language identifiers`_ and +:doc:`/topics/i18n/index`. + +.. _list of language identifiers: http://www.i18nguy.com/unicode/language-identifiers.html .. setting:: LANGUAGE_COOKIE_NAME @@ -1668,12 +1671,8 @@ TIME_ZONE Default: ``'America/Chicago'`` -A string representing the time zone for this installation, or -``None``. `See available choices`_. (Note that list of available -choices lists more than one on the same line; you'll want to use just -one of the choices for a given time zone. For instance, one line says -``'Europe/London GB GB-Eire'``, but you should use the first bit of -that -- ``'Europe/London'`` -- as your :setting:`TIME_ZONE` setting.) +A string representing the time zone for this installation, or ``None``. See +the `list of time zones`_. Note that this isn't necessarily the time zone of the server. For example, one server may serve multiple Django-powered sites, each with a separate time zone @@ -1706,7 +1705,7 @@ to ensure your processes are running in the correct environment. If you're running Django on Windows, :setting:`TIME_ZONE` must be set to match the system time zone. -.. _See available choices: http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE +.. _list of time zones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones .. _pytz: http://pytz.sourceforge.net/ |
