diff options
| author | Jannis Leidel <jannis@leidel.info> | 2011-05-29 17:50:52 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2011-05-29 17:50:52 +0000 |
| commit | 879267f254946a26ebc179f3880e14a59e11e038 (patch) | |
| tree | 3844835ca5aa451bf4c188b34e8cbfd85dec4996 /docs/ref/templates | |
| parent | 7f3eda2f76ea41e938cf623030f3a68e573d5017 (diff) | |
[1.3.X] Fixed #15992 -- Added more references to settings. Thanks, aaugustin.
Backport from trunk (r16290).
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.3.X@16291 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref/templates')
| -rw-r--r-- | docs/ref/templates/builtins.txt | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 353a7c7845..695bc87172 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -1295,10 +1295,11 @@ If ``value`` is a ``datetime`` object (e.g., the result of ``datetime.datetime.now()``), the output will be the string ``'Wed 09 Jan 2008'``. -The format passed can be one of the predefined ones ``DATE_FORMAT``, -``DATETIME_FORMAT``, ``SHORT_DATE_FORMAT`` or ``SHORT_DATETIME_FORMAT``, or a -custom format that uses the format specifiers shown in the table above. Note -that predefined formats may vary depending on the current locale. +The format passed can be one of the predefined ones :setting:`DATE_FORMAT`, +:setting:`DATETIME_FORMAT`, :setting:`SHORT_DATE_FORMAT` or +:setting:`SHORT_DATETIME_FORMAT`, or a custom format that uses the format +specifiers shown in the table above. Note that predefined formats may vary +depending on the current locale. Assuming that :setting:`USE_L10N` is ``True`` and :setting:`LANGUAGE_CODE` is, for example, ``"es"``, then for:: @@ -1929,9 +1930,9 @@ time Formats a time according to the given format. -Given format can be the predefined one ``TIME_FORMAT``, or a custom format, -same as the :tfilter:`date` filter. Note that the predefined format is locale- -dependant. +Given format can be the predefined one :setting:`TIME_FORMAT`, or a custom +format, same as the :tfilter:`date` filter. Note that the predefined format +is locale-dependant. The time filter will only accept parameters in the format string that relate to the time of day, not the date (for obvious reasons). If you need to @@ -2231,7 +2232,7 @@ Other tags and filter libraries ------------------------------- Django comes with a couple of other template-tag libraries that you have to -enable explicitly in your ``INSTALLED_APPS`` setting and enable in your +enable explicitly in your :setting:`INSTALLED_APPS` setting and enable in your template with the ``{% load %}`` tag. django.contrib.humanize @@ -2262,15 +2263,18 @@ i18n Provides a couple of templatetags that allow specifying translatable text in Django templates. It is slightly different from the libraries described -above because you don't need to add any application to the ``INSTALLED_APPS`` -setting but rather set :setting:`USE_I18N` to True, then loading it with -``{% load i18n %}``. See :ref:`specifying-translation-strings-in-template-code`. +above because you don't need to add any application to the +:setting:`INSTALLED_APPS` setting but rather set :setting:`USE_I18N` to True, +then loading it with ``{% load i18n %}``. + +See :ref:`specifying-translation-strings-in-template-code`. l10n ~~~~ Provides a couple of templatetags that allow control over the localization of values in Django templates. It is slightly different from the libraries described -above because you don't need to add any application to the ``INSTALLED_APPS``; -you only need to load the library using ``{% load l10n %}``. See -:ref:`topic-l10n-templates`. +above because you don't need to add any application to the :setting:`INSTALLED_APPS`; +you only need to load the library using ``{% load l10n %}``. + +See :ref:`topic-l10n-templates`. |
