diff -r b758351d191f -r cc9b7e14412b web/lib/django/conf/global_settings.py --- a/web/lib/django/conf/global_settings.py Wed May 19 17:43:59 2010 +0200 +++ b/web/lib/django/conf/global_settings.py Tue May 25 02:43:45 2010 +0200 @@ -42,8 +42,9 @@ # should be the utf-8 encoded local name for the language. LANGUAGES = ( ('ar', gettext_noop('Arabic')), + ('bg', gettext_noop('Bulgarian')), ('bn', gettext_noop('Bengali')), - ('bg', gettext_noop('Bulgarian')), + ('bs', gettext_noop('Bosnian')), ('ca', gettext_noop('Catalan')), ('cs', gettext_noop('Czech')), ('cy', gettext_noop('Welsh')), @@ -51,31 +52,36 @@ ('de', gettext_noop('German')), ('el', gettext_noop('Greek')), ('en', gettext_noop('English')), + ('en-gb', gettext_noop('British English')), ('es', gettext_noop('Spanish')), + ('es-ar', gettext_noop('Argentinean Spanish')), ('et', gettext_noop('Estonian')), - ('es-ar', gettext_noop('Argentinean Spanish')), ('eu', gettext_noop('Basque')), ('fa', gettext_noop('Persian')), ('fi', gettext_noop('Finnish')), ('fr', gettext_noop('French')), + ('fy-nl', gettext_noop('Frisian')), ('ga', gettext_noop('Irish')), ('gl', gettext_noop('Galician')), - ('hu', gettext_noop('Hungarian')), ('he', gettext_noop('Hebrew')), ('hi', gettext_noop('Hindi')), ('hr', gettext_noop('Croatian')), + ('hu', gettext_noop('Hungarian')), ('is', gettext_noop('Icelandic')), ('it', gettext_noop('Italian')), ('ja', gettext_noop('Japanese')), ('ka', gettext_noop('Georgian')), - ('ko', gettext_noop('Korean')), ('km', gettext_noop('Khmer')), ('kn', gettext_noop('Kannada')), - ('lv', gettext_noop('Latvian')), + ('ko', gettext_noop('Korean')), ('lt', gettext_noop('Lithuanian')), + ('lv', gettext_noop('Latvian')), ('mk', gettext_noop('Macedonian')), + ('mn', gettext_noop('Mongolian')), ('nl', gettext_noop('Dutch')), ('no', gettext_noop('Norwegian')), + ('nb', gettext_noop('Norwegian Bokmal')), + ('nn', gettext_noop('Norwegian Nynorsk')), ('pl', gettext_noop('Polish')), ('pt', gettext_noop('Portuguese')), ('pt-br', gettext_noop('Brazilian Portuguese')), @@ -83,13 +89,16 @@ ('ru', gettext_noop('Russian')), ('sk', gettext_noop('Slovak')), ('sl', gettext_noop('Slovenian')), + ('sq', gettext_noop('Albanian')), ('sr', gettext_noop('Serbian')), + ('sr-latn', gettext_noop('Serbian Latin')), ('sv', gettext_noop('Swedish')), ('ta', gettext_noop('Tamil')), ('te', gettext_noop('Telugu')), ('th', gettext_noop('Thai')), ('tr', gettext_noop('Turkish')), ('uk', gettext_noop('Ukrainian')), + ('vi', gettext_noop('Vietnamese')), ('zh-cn', gettext_noop('Simplified Chinese')), ('zh-tw', gettext_noop('Traditional Chinese')), ) @@ -103,6 +112,10 @@ LOCALE_PATHS = () LANGUAGE_COOKIE_NAME = 'django_language' +# If you set this to True, Django will format dates, numbers and calendars +# according to user current locale +USE_L10N = False + # Not-necessarily-technical managers of the site. They get broken link # notifications and other various e-mails. MANAGERS = ADMINS @@ -123,6 +136,7 @@ SEND_BROKEN_LINK_EMAILS = False # Database connection info. +# Legacy format DATABASE_ENGINE = '' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. DATABASE_NAME = '' # Or path to database file if using sqlite3. DATABASE_USER = '' # Not used with sqlite3. @@ -131,6 +145,19 @@ DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. DATABASE_OPTIONS = {} # Set to empty dictionary for default. +# New format +DATABASES = { +} + +# Classes used to implement db routing behaviour +DATABASE_ROUTERS = [] + +# The email backend to use. For possible shortcuts see django.core.mail. +# The default is to use the SMTP backend. +# Third-party backends can be specified by providing a Python path +# to a module that defines an EmailBackend class. +EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' + # Host for sending e-mail. EMAIL_HOST = 'localhost' @@ -152,20 +179,21 @@ # See the comments in django/core/template/loader.py for interface # documentation. TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.load_template_source', - 'django.template.loaders.app_directories.load_template_source', -# 'django.template.loaders.eggs.load_template_source', + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', +# 'django.template.loaders.eggs.Loader', ) # List of processors used by RequestContext to populate the context. # Each one should be a callable that takes the request object as its # only parameter and returns a dictionary to add to the context. TEMPLATE_CONTEXT_PROCESSORS = ( - 'django.core.context_processors.auth', + 'django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', # 'django.core.context_processors.request', + 'django.contrib.messages.context_processors.messages', ) # Output to use in template system for invalid (e.g. misspelled) variables. @@ -255,6 +283,12 @@ # you'd pass directly to os.chmod; see http://docs.python.org/lib/os-file-dir.html. FILE_UPLOAD_PERMISSIONS = None +# Python module path where user will place custom format definition. +# The directory where this setting is pointing should contain subdirectories +# named as the locales, containing a formats.py file +# (i.e. "myproject.locale" for myproject/locale/en/formats.py etc. use) +FORMAT_MODULE_PATH = None + # Default formatting for date objects. See all available format strings here: # http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now DATE_FORMAT = 'N j, Y' @@ -277,6 +311,70 @@ # http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now MONTH_DAY_FORMAT = 'F j' +# Default short formatting for date objects. See all available format strings here: +# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now +SHORT_DATE_FORMAT = 'm/d/Y' + +# Default short formatting for datetime objects. +# See all available format strings here: +# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now +SHORT_DATETIME_FORMAT = 'm/d/Y P' + +# Default formats to be used when parsing dates from input boxes, in order +# See all available format string here: +# http://docs.python.org/library/datetime.html#strftime-behavior +# * Note that these format strings are different from the ones to display dates +DATE_INPUT_FORMATS = ( + '%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', # '2006-10-25', '10/25/2006', '10/25/06' + '%b %d %Y', '%b %d, %Y', # 'Oct 25 2006', 'Oct 25, 2006' + '%d %b %Y', '%d %b, %Y', # '25 Oct 2006', '25 Oct, 2006' + '%B %d %Y', '%B %d, %Y', # 'October 25 2006', 'October 25, 2006' + '%d %B %Y', '%d %B, %Y', # '25 October 2006', '25 October, 2006' +) + +# Default formats to be used when parsing times from input boxes, in order +# See all available format string here: +# http://docs.python.org/library/datetime.html#strftime-behavior +# * Note that these format strings are different from the ones to display dates +TIME_INPUT_FORMATS = ( + '%H:%M:%S', # '14:30:59' + '%H:%M', # '14:30' +) + +# Default formats to be used when parsing dates and times from input boxes, +# in order +# See all available format string here: +# http://docs.python.org/library/datetime.html#strftime-behavior +# * Note that these format strings are different from the ones to display dates +DATETIME_INPUT_FORMATS = ( + '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' + '%Y-%m-%d %H:%M', # '2006-10-25 14:30' + '%Y-%m-%d', # '2006-10-25' + '%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59' + '%m/%d/%Y %H:%M', # '10/25/2006 14:30' + '%m/%d/%Y', # '10/25/2006' + '%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59' + '%m/%d/%y %H:%M', # '10/25/06 14:30' + '%m/%d/%y', # '10/25/06' +) + +# First day of week, to be used on calendars +# 0 means Sunday, 1 means Monday... +FIRST_DAY_OF_WEEK = 0 + +# Decimal separator symbol +DECIMAL_SEPARATOR = '.' + +# Boolean that sets whether to add thousand separator when formatting numbers +USE_THOUSAND_SEPARATOR = False + +# Number of digits that will be togheter, when spliting them by THOUSAND_SEPARATOR +# 0 means no grouping, 3 means splitting by thousands... +NUMBER_GROUPING = 0 + +# Thousand separator symbol +THOUSAND_SEPARATOR = ',' + # Do you want to manage transactions manually? # Hint: you really don't! TRANSACTIONS_MANAGED = False @@ -300,7 +398,9 @@ MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', # 'django.middleware.http.ConditionalGetMiddleware', # 'django.middleware.gzip.GZipMiddleware', ) @@ -374,12 +474,34 @@ # The number of days a password reset link is valid for PASSWORD_RESET_TIMEOUT_DAYS = 3 +######## +# CSRF # +######## + +# Dotted path to callable to be used as view when a request is +# rejected by the CSRF middleware. +CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure' + +# Name and domain for CSRF cookie. +CSRF_COOKIE_NAME = 'csrftoken' +CSRF_COOKIE_DOMAIN = None + +############ +# MESSAGES # +############ + +# Class to use as messges backend +MESSAGE_STORAGE = 'django.contrib.messages.storage.user_messages.LegacyFallbackStorage' + +# Default values of MESSAGE_LEVEL and MESSAGE_TAGS are defined within +# django.contrib.messages to avoid imports in this settings file. + ########### # TESTING # ########### -# The name of the method to use to invoke the test suite -TEST_RUNNER = 'django.test.simple.run_tests' +# The name of the class to use to run the test suite +TEST_RUNNER = 'django.test.simple.DjangoTestSuiteRunner' # The name of the database to use for testing purposes. # If None, a name of 'test_' + DATABASE_NAME will be assumed