From 44390aeb5de635afaa48025db774fe8b2c048467 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Mon, 15 Mar 2010 12:16:21 +0000 Subject: [PATCH] Fixed #13045 - Add USE_L10N to the project skeleton settings. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12786 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/conf/project_template/settings.py | 4 ++++ docs/topics/i18n/localization.txt | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/django/conf/project_template/settings.py b/django/conf/project_template/settings.py index ee08e9712b..ee4c9b5e96 100644 --- a/django/conf/project_template/settings.py +++ b/django/conf/project_template/settings.py @@ -39,6 +39,10 @@ SITE_ID = 1 # to load the internationalization machinery. USE_I18N = True +# If you set this to False, Django will not format dates, numbers and +# calendars according to the current locale +USE_L10N = True + # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" MEDIA_ROOT = '' diff --git a/docs/topics/i18n/localization.txt b/docs/topics/i18n/localization.txt index 3431a25a12..10e59230e0 100644 --- a/docs/topics/i18n/localization.txt +++ b/docs/topics/i18n/localization.txt @@ -249,8 +249,13 @@ Format localization .. versionadded:: 1.2 -Django's formatting system is disabled by default. To enable it, it's necessary -to set :setting:`USE_L10N = True ` in your settings file. +Django's formatting system is disabled by default. To enable it, it's +necessary to set :setting:`USE_L10N = True ` in your settings file. + +.. note:: + The default :file:`settings.py` file created by + :djadmin:`django-admin.py startproject ` includes + :setting:`USE_L10N = True ` for convenience. When using Django's formatting system, dates and numbers on templates will be displayed using the format specified for the current locale. Two users