summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authordarkryder <sambhav13085@iiitd.ac.in>2015-01-21 22:25:57 +0530
committerTim Graham <timograham@gmail.com>2015-02-03 14:59:45 -0500
commit9ec8aa5e5d42ac4529846f7eae6bf4982800abff (patch)
tree6a1195ff3831031f8207e18e4dcf69015fb4c50c /django
parent570912a97d5051fa3aeacd9d16c3be9afcf92198 (diff)
Fixed #24149 -- Normalized tuple settings to lists.
Diffstat (limited to 'django')
-rw-r--r--django/conf/__init__.py5
-rw-r--r--django/conf/global_settings.py80
-rw-r--r--django/conf/locale/ca/formats.py8
-rw-r--r--django/conf/locale/cs/formats.py12
-rw-r--r--django/conf/locale/cy/formats.py8
-rw-r--r--django/conf/locale/da/formats.py8
-rw-r--r--django/conf/locale/de/formats.py8
-rw-r--r--django/conf/locale/de_CH/formats.py8
-rw-r--r--django/conf/locale/el/formats.py8
-rw-r--r--django/conf/locale/en/formats.py8
-rw-r--r--django/conf/locale/en_AU/formats.py8
-rw-r--r--django/conf/locale/en_GB/formats.py8
-rw-r--r--django/conf/locale/eo/formats.py12
-rw-r--r--django/conf/locale/es/formats.py8
-rw-r--r--django/conf/locale/es_AR/formats.py8
-rw-r--r--django/conf/locale/es_MX/formats.py8
-rw-r--r--django/conf/locale/es_NI/formats.py8
-rw-r--r--django/conf/locale/es_PR/formats.py8
-rw-r--r--django/conf/locale/fi/formats.py12
-rw-r--r--django/conf/locale/fr/formats.py12
-rw-r--r--django/conf/locale/hr/formats.py8
-rw-r--r--django/conf/locale/hu/formats.py12
-rw-r--r--django/conf/locale/id/formats.py12
-rw-r--r--django/conf/locale/it/formats.py8
-rw-r--r--django/conf/locale/ka/formats.py8
-rw-r--r--django/conf/locale/ko/formats.py12
-rw-r--r--django/conf/locale/lt/formats.py12
-rw-r--r--django/conf/locale/lv/formats.py12
-rw-r--r--django/conf/locale/mk/formats.py8
-rw-r--r--django/conf/locale/ml/formats.py8
-rw-r--r--django/conf/locale/nb/formats.py8
-rw-r--r--django/conf/locale/nl/formats.py12
-rw-r--r--django/conf/locale/nn/formats.py8
-rw-r--r--django/conf/locale/pl/formats.py8
-rw-r--r--django/conf/locale/pt/formats.py8
-rw-r--r--django/conf/locale/pt_BR/formats.py8
-rw-r--r--django/conf/locale/ru/formats.py8
-rw-r--r--django/conf/locale/sk/formats.py8
-rw-r--r--django/conf/locale/sl/formats.py8
-rw-r--r--django/conf/locale/sr/formats.py8
-rw-r--r--django/conf/locale/sr_Latn/formats.py8
-rw-r--r--django/conf/locale/sv/formats.py8
-rw-r--r--django/conf/locale/tr/formats.py8
-rw-r--r--django/conf/locale/zh_Hans/formats.py12
-rw-r--r--django/conf/locale/zh_Hant/formats.py12
-rw-r--r--django/conf/project_template/project_name/settings.py8
-rw-r--r--django/contrib/auth/checks.py2
-rw-r--r--django/contrib/auth/tests/settings.py8
-rw-r--r--django/contrib/auth/tests/test_auth_backends.py54
-rw-r--r--django/contrib/auth/tests/test_context_processors.py2
-rw-r--r--django/contrib/auth/tests/test_forms.py12
-rw-r--r--django/contrib/auth/tests/test_remote_user.py18
-rw-r--r--django/contrib/auth/tests/test_signals.py2
-rw-r--r--django/contrib/auth/tests/test_templates.py2
-rw-r--r--django/contrib/auth/tests/test_views.py28
-rw-r--r--django/contrib/flatpages/tests/test_csrf.py4
-rw-r--r--django/contrib/flatpages/tests/test_forms.py4
-rw-r--r--django/contrib/flatpages/tests/test_middleware.py8
-rw-r--r--django/contrib/flatpages/tests/test_templatetags.py4
-rw-r--r--django/contrib/flatpages/tests/test_views.py8
-rw-r--r--django/core/management/commands/makemessages.py2
-rw-r--r--django/templatetags/i18n.py2
-rw-r--r--django/utils/formats.py8
-rw-r--r--django/views/i18n.py2
64 files changed, 321 insertions, 334 deletions
diff --git a/django/conf/__init__.py b/django/conf/__init__.py
index 7ca099b47b..63d32be9c9 100644
--- a/django/conf/__init__.py
+++ b/django/conf/__init__.py
@@ -15,7 +15,6 @@ from django.conf import global_settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.functional import LazyObject, empty
-from django.utils import six
ENVIRONMENT_VARIABLE = "DJANGO_SETTINGS_MODULE"
@@ -103,8 +102,8 @@ class Settings(BaseSettings):
setting_value = getattr(mod, setting)
if (setting in tuple_settings and
- isinstance(setting_value, six.string_types)):
- raise ImproperlyConfigured("The %s setting must be a tuple. "
+ not isinstance(setting_value, (list, tuple))):
+ raise ImproperlyConfigured("The %s setting must be a list or a tuple. "
"Please fix your settings." % setting)
setattr(self, setting, setting_value)
self._explicit_settings.add(setting)
diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py
index 597091916a..41abd4f499 100644
--- a/django/conf/global_settings.py
+++ b/django/conf/global_settings.py
@@ -21,13 +21,13 @@ DEBUG_PROPAGATE_EXCEPTIONS = False
USE_ETAGS = False
# People who get code error notifications.
-# In the format (('Full Name', 'email@example.com'), ('Full Name', 'anotheremail@example.com'))
-ADMINS = ()
+# In the format [('Full Name', 'email@example.com'), ('Full Name', 'anotheremail@example.com')]
+ADMINS = []
-# Tuple of IP addresses, as strings, that:
+# List of IP addresses, as strings, that:
# * See debug comments, when DEBUG is true
# * Receive x-headers
-INTERNAL_IPS = ()
+INTERNAL_IPS = []
# Hosts/domain names that are valid for this site.
# "*" matches anything, ".example.com" matches example.com and all subdomains
@@ -47,7 +47,7 @@ USE_TZ = False
LANGUAGE_CODE = 'en-us'
# Languages we provide translations for, out of the box.
-LANGUAGES = (
+LANGUAGES = [
('af', gettext_noop('Afrikaans')),
('ar', gettext_noop('Arabic')),
('ast', gettext_noop('Asturian')),
@@ -132,15 +132,15 @@ LANGUAGES = (
('vi', gettext_noop('Vietnamese')),
('zh-hans', gettext_noop('Simplified Chinese')),
('zh-hant', gettext_noop('Traditional Chinese')),
-)
+]
# Languages using BiDi (right-to-left) layout
-LANGUAGES_BIDI = ("he", "ar", "fa", "ur")
+LANGUAGES_BIDI = ["he", "ar", "fa", "ur"]
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
-LOCALE_PATHS = ()
+LOCALE_PATHS = []
# Settings for language cookie
LANGUAGE_COOKIE_NAME = 'django_language'
@@ -197,24 +197,24 @@ EMAIL_SSL_KEYFILE = None
EMAIL_TIMEOUT = None
# List of strings representing installed apps.
-INSTALLED_APPS = ()
+INSTALLED_APPS = []
# List of locations of the template source files, in search order.
-TEMPLATE_DIRS = ()
+TEMPLATE_DIRS = []
# List of callables that know how to import templates from various sources.
# See the comments in django/core/template/loader.py for interface
# documentation.
-TEMPLATE_LOADERS = (
+TEMPLATE_LOADERS = [
'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 = (
+TEMPLATE_CONTEXT_PROCESSORS = [
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
@@ -223,7 +223,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
'django.template.context_processors.tz',
# 'django.template.context_processors.request',
'django.contrib.messages.context_processors.messages',
-)
+]
# Output to use in template system for invalid (e.g. misspelled) variables.
TEMPLATE_STRING_IF_INVALID = ''
@@ -251,31 +251,31 @@ FORCE_SCRIPT_NAME = None
# that are not allowed to visit any page, systemwide. Use this for bad
# robots/crawlers. Here are a few examples:
# import re
-# DISALLOWED_USER_AGENTS = (
+# DISALLOWED_USER_AGENTS = [
# re.compile(r'^NaverBot.*'),
# re.compile(r'^EmailSiphon.*'),
# re.compile(r'^SiteSucker.*'),
# re.compile(r'^sohu-search')
-# )
-DISALLOWED_USER_AGENTS = ()
+# ]
+DISALLOWED_USER_AGENTS = []
ABSOLUTE_URL_OVERRIDES = {}
-# Tuple of strings representing allowed prefixes for the {% ssi %} tag.
-# Example: ('/home/html', '/var/www')
-ALLOWED_INCLUDE_ROOTS = ()
+# List of strings representing allowed prefixes for the {% ssi %} tag.
+# Example: ['/home/html', '/var/www']
+ALLOWED_INCLUDE_ROOTS = []
# List of compiled regular expression objects representing URLs that need not
# be reported by BrokenLinkEmailsMiddleware. Here are a few examples:
# import re
-# IGNORABLE_404_URLS = (
+# IGNORABLE_404_URLS = [
# re.compile(r'^/apple-touch-icon.*\.png$'),
# re.compile(r'^/favicon.ico$),
# re.compile(r'^/robots.txt$),
# re.compile(r'^/phpmyadmin/),
# re.compile(r'\.(cgi|php|pl)$'),
-# )
-IGNORABLE_404_URLS = ()
+# ]
+IGNORABLE_404_URLS = []
# A secret key for this particular Django installation. Used in secret-key
# hashing algorithms. Set this in your settings, or Django will complain
@@ -302,10 +302,10 @@ STATIC_ROOT = None
STATIC_URL = None
# List of upload handler classes to be applied in order.
-FILE_UPLOAD_HANDLERS = (
+FILE_UPLOAD_HANDLERS = [
'django.core.files.uploadhandler.MemoryFileUploadHandler',
'django.core.files.uploadhandler.TemporaryFileUploadHandler',
-)
+]
# Maximum size, in bytes, of a request before it will be streamed to the
# file system instead of into memory.
@@ -366,30 +366,30 @@ SHORT_DATETIME_FORMAT = 'm/d/Y P'
# 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 = (
+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 = (
+TIME_INPUT_FORMATS = [
'%H:%M:%S', # '14:30:59'
'%H:%M:%S.%f', # '14:30:59.000200'
'%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 = (
+DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
@@ -402,7 +402,7 @@ DATETIME_INPUT_FORMATS = (
'%m/%d/%y %H:%M:%S.%f', # '10/25/06 14:30:59.000200'
'%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...
@@ -453,10 +453,10 @@ SECURE_PROXY_SSL_HEADER = None
# List of middleware classes to use. Order is important; in the request phase,
# this middleware classes will be applied in the order given, and in the
# response phase the middleware will be applied in reverse order.
-MIDDLEWARE_CLASSES = (
+MIDDLEWARE_CLASSES = [
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
-)
+]
############
# SESSIONS #
@@ -508,7 +508,7 @@ CACHE_MIDDLEWARE_ALIAS = 'default'
AUTH_USER_MODEL = 'auth.User'
-AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend',)
+AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
LOGIN_URL = '/accounts/login/'
@@ -522,7 +522,7 @@ PASSWORD_RESET_TIMEOUT_DAYS = 3
# the first hasher in this list is the preferred algorithm. any
# password using different algorithms will be converted automatically
# upon login
-PASSWORD_HASHERS = (
+PASSWORD_HASHERS = [
'django.contrib.auth.hashers.PBKDF2PasswordHasher',
'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
'django.contrib.auth.hashers.BCryptSHA256PasswordHasher',
@@ -532,7 +532,7 @@ PASSWORD_HASHERS = (
'django.contrib.auth.hashers.UnsaltedSHA1PasswordHasher',
'django.contrib.auth.hashers.UnsaltedMD5PasswordHasher',
'django.contrib.auth.hashers.CryptPasswordHasher',
-)
+]
###########
# SIGNING #
@@ -596,25 +596,25 @@ TEST_NON_SERIALIZED_APPS = []
############
# The list of directories to search for fixtures
-FIXTURE_DIRS = ()
+FIXTURE_DIRS = []
###############
# STATICFILES #
###############
# A list of locations of additional static files
-STATICFILES_DIRS = ()
+STATICFILES_DIRS = []
# The default file storage backend used during the build process
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
# List of finder classes that know how to find static files in
# various locations.
-STATICFILES_FINDERS = (
+STATICFILES_FINDERS = [
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
-)
+]
##############
# MIGRATIONS #
diff --git a/django/conf/locale/ca/formats.py b/django/conf/locale/ca/formats.py
index 5acd742907..d42016b716 100644
--- a/django/conf/locale/ca/formats.py
+++ b/django/conf/locale/ca/formats.py
@@ -16,18 +16,18 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
# '31/12/2009', '31/12/09'
'%d/%m/%Y', '%d/%m/%y'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S',
'%d/%m/%Y %H:%M:%S.%f',
'%d/%m/%Y %H:%M',
'%d/%m/%y %H:%M:%S',
'%d/%m/%y %H:%M:%S.%f',
'%d/%m/%y %H:%M',
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/cs/formats.py b/django/conf/locale/cs/formats.py
index 45e2a898a3..3f2d3fa70e 100644
--- a/django/conf/locale/cs/formats.py
+++ b/django/conf/locale/cs/formats.py
@@ -16,18 +16,18 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d.%m.%Y', '%d.%m.%y', # '05.01.2006', '05.01.06'
'%d. %m. %Y', '%d. %m. %y', # '5. 1. 2006', '5. 1. 06'
# '%d. %B %Y', '%d. %b. %Y', # '25. October 2006', '25. Oct. 2006'
-)
+]
# Kept ISO formats as one is in first position
-TIME_INPUT_FORMATS = (
+TIME_INPUT_FORMATS = [
'%H:%M:%S', # '04:30:59'
'%H.%M', # '04.30'
'%H:%M', # '04:30'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '05.01.2006 04:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '05.01.2006 04:30:59.000200'
'%d.%m.%Y %H.%M', # '05.01.2006 04.30'
@@ -39,7 +39,7 @@ DATETIME_INPUT_FORMATS = (
'%d. %m. %Y %H:%M', # '05. 01. 2006 04:30'
'%d. %m. %Y', # '05. 01. 2006'
'%Y-%m-%d %H.%M', # '2006-01-05 04.30'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/cy/formats.py b/django/conf/locale/cy/formats.py
index d091619bef..4a69a88e6a 100644
--- a/django/conf/locale/cy/formats.py
+++ b/django/conf/locale/cy/formats.py
@@ -16,10 +16,10 @@ FIRST_DAY_OF_WEEK = 1 # 'Dydd Llun'
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
@@ -32,7 +32,7 @@ DATETIME_INPUT_FORMATS = (
'%d/%m/%y %H:%M:%S.%f', # '25/10/06 14:30:59.000200'
'%d/%m/%y %H:%M', # '25/10/06 14:30'
'%d/%m/%y', # '25/10/06'
-)
+]
DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ','
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/da/formats.py b/django/conf/locale/da/formats.py
index dcdf35173e..90ba056f79 100644
--- a/django/conf/locale/da/formats.py
+++ b/django/conf/locale/da/formats.py
@@ -16,14 +16,14 @@ FIRST_DAY_OF_WEEK = 1
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '25.10.2006'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/de/formats.py b/django/conf/locale/de/formats.py
index 03e1219b81..cf1283b2a5 100644
--- a/django/conf/locale/de/formats.py
+++ b/django/conf/locale/de/formats.py
@@ -16,16 +16,16 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06'
# '%d. %B %Y', '%d. %b. %Y', # '25. October 2006', '25. Oct. 2006'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30'
'%d.%m.%Y', # '25.10.2006'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/de_CH/formats.py b/django/conf/locale/de_CH/formats.py
index 269a85b152..f8a9b90631 100644
--- a/django/conf/locale/de_CH/formats.py
+++ b/django/conf/locale/de_CH/formats.py
@@ -17,16 +17,16 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06'
# '%d. %B %Y', '%d. %b. %Y', # '25. October 2006', '25. Oct. 2006'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30'
'%d.%m.%Y', # '25.10.2006'
-)
+]
# these are the separators for non-monetary numbers. For monetary numbers,
# the DECIMAL_SEPARATOR is a . (decimal point) and the THOUSAND_SEPARATOR is a
diff --git a/django/conf/locale/el/formats.py b/django/conf/locale/el/formats.py
index 429db4b508..7cfcd10e36 100644
--- a/django/conf/locale/el/formats.py
+++ b/django/conf/locale/el/formats.py
@@ -16,10 +16,10 @@ FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d/%m/%Y', '%d/%m/%y', '%Y-%m-%d', # '25/10/2006', '25/10/06', '2006-10-25',
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59'
'%d/%m/%Y %H:%M:%S.%f', # '25/10/2006 14:30:59.000200'
'%d/%m/%Y %H:%M', # '25/10/2006 14:30'
@@ -32,7 +32,7 @@ DATETIME_INPUT_FORMATS = (
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
'%Y-%m-%d', # '2006-10-25'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/en/formats.py b/django/conf/locale/en/formats.py
index 279cd3c518..63b23fa260 100644
--- a/django/conf/locale/en/formats.py
+++ b/django/conf/locale/en/formats.py
@@ -17,14 +17,14 @@ FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
-DATE_INPUT_FORMATS = (
+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'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
@@ -37,7 +37,7 @@ DATETIME_INPUT_FORMATS = (
'%m/%d/%y %H:%M:%S.%f', # '10/25/06 14:30:59.000200'
'%m/%d/%y %H:%M', # '10/25/06 14:30'
'%m/%d/%y', # '10/25/06'
-)
+]
DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ','
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/en_AU/formats.py b/django/conf/locale/en_AU/formats.py
index 5dd55743b6..fe97ea98c1 100644
--- a/django/conf/locale/en_AU/formats.py
+++ b/django/conf/locale/en_AU/formats.py
@@ -16,14 +16,14 @@ FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/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'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
@@ -36,7 +36,7 @@ DATETIME_INPUT_FORMATS = (
'%d/%m/%y %H:%M:%S.%f', # '25/10/06 14:30:59.000200'
'%d/%m/%y %H:%M', # '25/10/06 14:30'
'%d/%m/%y', # '25/10/06'
-)
+]
DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ','
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/en_GB/formats.py b/django/conf/locale/en_GB/formats.py
index b2f24c0714..190ec7316d 100644
--- a/django/conf/locale/en_GB/formats.py
+++ b/django/conf/locale/en_GB/formats.py
@@ -16,14 +16,14 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/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'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
@@ -36,7 +36,7 @@ DATETIME_INPUT_FORMATS = (
'%d/%m/%y %H:%M:%S.%f', # '25/10/06 14:30:59.000200'
'%d/%m/%y %H:%M', # '25/10/06 14:30'
'%d/%m/%y', # '25/10/06'
-)
+]
DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ','
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/eo/formats.py b/django/conf/locale/eo/formats.py
index 7a92a628b7..1e61912442 100644
--- a/django/conf/locale/eo/formats.py
+++ b/django/conf/locale/eo/formats.py
@@ -16,7 +16,7 @@ FIRST_DAY_OF_WEEK = 1 # Monday (lundo)
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '1887-07-26'
'%y-%m-%d', # '87-07-26'
'%Y %m %d', # '1887 07 26'
@@ -25,12 +25,12 @@ DATE_INPUT_FORMATS = (
'%d-a de %B %Y', # '26-a de julio 1887'
'%d %B %Y', # '26 julio 1887'
'%d %m %Y', # '26 07 1887'
-)
-TIME_INPUT_FORMATS = (
+]
+TIME_INPUT_FORMATS = [
'%H:%M:%S', # '18:59:00'
'%H:%M', # '18:59'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '1887-07-26 18:59:00'
'%Y-%m-%d %H:%M', # '1887-07-26 18:59'
'%Y-%m-%d', # '1887-07-26'
@@ -46,7 +46,7 @@ DATETIME_INPUT_FORMATS = (
'%y-%m-%d %H:%M:%S', # '87-07-26 18:59:00'
'%y-%m-%d %H:%M', # '87-07-26 18:59'
'%y-%m-%d', # '87-07-26'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/es/formats.py b/django/conf/locale/es/formats.py
index a296bee243..701032aefd 100644
--- a/django/conf/locale/es/formats.py
+++ b/django/conf/locale/es/formats.py
@@ -16,18 +16,18 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
# '31/12/2009', '31/12/09'
'%d/%m/%Y', '%d/%m/%y'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S',
'%d/%m/%Y %H:%M:%S.%f',
'%d/%m/%Y %H:%M',
'%d/%m/%y %H:%M:%S',
'%d/%m/%y %H:%M:%S.%f',
'%d/%m/%y %H:%M',
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/es_AR/formats.py b/django/conf/locale/es_AR/formats.py
index 6ad96e8dcd..9daf38d8ef 100644
--- a/django/conf/locale/es_AR/formats.py
+++ b/django/conf/locale/es_AR/formats.py
@@ -16,18 +16,18 @@ FIRST_DAY_OF_WEEK = 0 # 0: Sunday, 1: Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d/%m/%Y', # '31/12/2009'
'%d/%m/%y', # '31/12/09'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S',
'%d/%m/%Y %H:%M:%S.%f',
'%d/%m/%Y %H:%M',
'%d/%m/%y %H:%M:%S',
'%d/%m/%y %H:%M:%S.%f',
'%d/%m/%y %H:%M',
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/es_MX/formats.py b/django/conf/locale/es_MX/formats.py
index 3ea2b28797..d15041660d 100644
--- a/django/conf/locale/es_MX/formats.py
+++ b/django/conf/locale/es_MX/formats.py
@@ -11,18 +11,18 @@ MONTH_DAY_FORMAT = r'j \d\e F'
SHORT_DATE_FORMAT = 'd/m/Y'
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
FIRST_DAY_OF_WEEK = 1 # Monday: ISO 8601
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
'%Y%m%d', # '20061025'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S',
'%d/%m/%Y %H:%M:%S.%f',
'%d/%m/%Y %H:%M',
'%d/%m/%y %H:%M:%S',
'%d/%m/%y %H:%M:%S.%f',
'%d/%m/%y %H:%M',
-)
+]
DECIMAL_SEPARATOR = '.' # ',' is also official (less common): NOM-008-SCFI-2002
THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/es_NI/formats.py b/django/conf/locale/es_NI/formats.py
index da524d9991..cc03b2cd2c 100644
--- a/django/conf/locale/es_NI/formats.py
+++ b/django/conf/locale/es_NI/formats.py
@@ -11,19 +11,19 @@ MONTH_DAY_FORMAT = r'j \d\e F'
SHORT_DATE_FORMAT = 'd/m/Y'
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
FIRST_DAY_OF_WEEK = 1 # Monday: ISO 8601
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
'%Y%m%d', # '20061025'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S',
'%d/%m/%Y %H:%M:%S.%f',
'%d/%m/%Y %H:%M',
'%d/%m/%y %H:%M:%S',
'%d/%m/%y %H:%M:%S.%f',
'%d/%m/%y %H:%M',
-)
+]
DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ','
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/es_PR/formats.py b/django/conf/locale/es_PR/formats.py
index dc16323e7a..c6680f7975 100644
--- a/django/conf/locale/es_PR/formats.py
+++ b/django/conf/locale/es_PR/formats.py
@@ -12,18 +12,18 @@ SHORT_DATE_FORMAT = 'd/m/Y'
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
FIRST_DAY_OF_WEEK = 0 # Sunday
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
# '31/12/2009', '31/12/09'
'%d/%m/%Y', '%d/%m/%y'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S',
'%d/%m/%Y %H:%M:%S.%f',
'%d/%m/%Y %H:%M',
'%d/%m/%y %H:%M:%S',
'%d/%m/%y %H:%M:%S.%f',
'%d/%m/%y %H:%M',
-)
+]
DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ','
diff --git a/django/conf/locale/fi/formats.py b/django/conf/locale/fi/formats.py
index 5a0dc2d576..b5c74211a3 100644
--- a/django/conf/locale/fi/formats.py
+++ b/django/conf/locale/fi/formats.py
@@ -16,11 +16,11 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '20.3.2014'
'%d.%m.%y', # '20.3.14'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H.%M.%S', # '20.3.2014 14.30.59'
'%d.%m.%Y %H.%M.%S.%f', # '20.3.2014 14.30.59.000200'
'%d.%m.%Y %H.%M', # '20.3.2014 14.30'
@@ -30,12 +30,12 @@ DATETIME_INPUT_FORMATS = (
'%d.%m.%y %H.%M.%S.%f', # '20.3.14 14.30.59.000200'
'%d.%m.%y %H.%M', # '20.3.14 14.30'
'%d.%m.%y', # '20.3.14'
-)
-TIME_INPUT_FORMATS = (
+]
+TIME_INPUT_FORMATS = [
'%H.%M.%S', # '14.30.59'
'%H.%M.%S.%f', # '14.30.59.000200'
'%H.%M', # '14.30'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '\xa0' # Non-breaking space
diff --git a/django/conf/locale/fr/formats.py b/django/conf/locale/fr/formats.py
index 4e2391fd72..ed6d8c7aaa 100644
--- a/django/conf/locale/fr/formats.py
+++ b/django/conf/locale/fr/formats.py
@@ -16,21 +16,21 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
- '%d.%m.%Y', '%d.%m.%y', # Swiss (fr_CH), '25.10.2006', '25.10.06'
+ '%d.%m.%Y', '%d.%m.%y', # Swiss [fr_CH), '25.10.2006', '25.10.06'
# '%d %B %Y', '%d %b %Y', # '25 octobre 2006', '25 oct. 2006'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59'
'%d/%m/%Y %H:%M:%S.%f', # '25/10/2006 14:30:59.000200'
'%d/%m/%Y %H:%M', # '25/10/2006 14:30'
'%d/%m/%Y', # '25/10/2006'
- '%d.%m.%Y %H:%M:%S', # Swiss (fr_CH), '25.10.2006 14:30:59'
+ '%d.%m.%Y %H:%M:%S', # Swiss [fr_CH), '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # Swiss (fr_CH), '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # Swiss (fr_CH), '25.10.2006 14:30'
'%d.%m.%Y', # Swiss (fr_CH), '25.10.2006'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/hr/formats.py b/django/conf/locale/hr/formats.py
index 275978acbf..59bcb8657d 100644
--- a/django/conf/locale/hr/formats.py
+++ b/django/conf/locale/hr/formats.py
@@ -17,12 +17,12 @@ FIRST_DAY_OF_WEEK = 1
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '2006-10-25'
'%d.%m.%Y.', '%d.%m.%y.', # '25.10.2006.', '25.10.06.'
'%d. %m. %Y.', '%d. %m. %y.', # '25. 10. 2006.', '25. 10. 06.'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
@@ -43,7 +43,7 @@ DATETIME_INPUT_FORMATS = (
'%d. %m. %y. %H:%M:%S.%f', # '25. 10. 06. 14:30:59.000200'
'%d. %m. %y. %H:%M', # '25. 10. 06. 14:30'
'%d. %m. %y.', # '25. 10. 06.'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
diff --git a/django/conf/locale/hu/formats.py b/django/conf/locale/hu/formats.py
index a74b35b74c..e17e8c99ad 100644
--- a/django/conf/locale/hu/formats.py
+++ b/django/conf/locale/hu/formats.py
@@ -16,19 +16,19 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%Y.%m.%d.', # '2006.10.25.'
-)
-TIME_INPUT_FORMATS = (
+]
+TIME_INPUT_FORMATS = [
'%H.%M.%S', # '14.30.59'
'%H.%M', # '14.30'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%Y.%m.%d. %H.%M.%S', # '2006.10.25. 14.30.59'
'%Y.%m.%d. %H.%M.%S.%f', # '2006.10.25. 14.30.59.000200'
'%Y.%m.%d. %H.%M', # '2006.10.25. 14.30'
'%Y.%m.%d.', # '2006.10.25.'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = ' ' # Non-breaking space
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/id/formats.py b/django/conf/locale/id/formats.py
index ed38b0270b..dc3dbf9dd8 100644
--- a/django/conf/locale/id/formats.py
+++ b/django/conf/locale/id/formats.py
@@ -16,19 +16,19 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d-%m-%y', '%d/%m/%y', # '25-10-09', 25/10/09'
'%d-%m-%Y', '%d/%m/%Y', # '25-10-2009', 25/10/2009'
'%d %b %Y', # '25 Oct 2006',
'%d %B %Y', # '25 October 2006'
-)
+]
-TIME_INPUT_FORMATS = (
+TIME_INPUT_FORMATS = [
'%H.%M.%S', # '14.30.59'
'%H.%M', # '14.30'
-)
+]
-DATETIME_INPUT_FORMATS = (
+DATETIME_INPUT_FORMATS = [
'%d-%m-%Y %H.%M.%S', # '25-10-2009 14.30.59'
'%d-%m-%Y %H.%M.%S.%f', # '25-10-2009 14.30.59.000200'
'%d-%m-%Y %H.%M', # '25-10-2009 14.30'
@@ -45,7 +45,7 @@ DATETIME_INPUT_FORMATS = (
'%m/%d/%Y %H.%M.%S.%f', # '25/10/2009 14.30.59.000200'
'%m/%d/%Y %H.%M', # '25/10/2009 14.30'
'%m/%d/%Y', # '10/25/2009'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
diff --git a/django/conf/locale/it/formats.py b/django/conf/locale/it/formats.py
index f8fbac2ee2..054b973f0a 100644
--- a/django/conf/locale/it/formats.py
+++ b/django/conf/locale/it/formats.py
@@ -16,12 +16,12 @@ FIRST_DAY_OF_WEEK = 1 # Lunedì
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d/%m/%Y', '%Y/%m/%d', # '25/10/2006', '2008/10/25'
'%d-%m-%Y', '%Y-%m-%d', # '25-10-2006', '2008-10-25'
'%d-%m-%y', '%d/%m/%y', # '25-10-06', '25/10/06'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59'
'%d/%m/%Y %H:%M:%S.%f', # '25/10/2006 14:30:59.000200'
'%d/%m/%Y %H:%M', # '25/10/2006 14:30'
@@ -42,7 +42,7 @@ DATETIME_INPUT_FORMATS = (
'%d-%m-%y %H:%M:%S.%f', # '25-10-06 14:30:59.000200'
'%d-%m-%y %H:%M', # '25-10-06 14:30'
'%d-%m-%y', # '25-10-06'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/ka/formats.py b/django/conf/locale/ka/formats.py
index 79a984a57c..226f5f721e 100644
--- a/django/conf/locale/ka/formats.py
+++ b/django/conf/locale/ka/formats.py
@@ -17,13 +17,13 @@ FIRST_DAY_OF_WEEK = 1 # (Monday)
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', # '2006-10-25', '10/25/2006', '10/25/06'
# '%d %b %Y', '%d %b, %Y', '%d %b. %Y', # '25 Oct 2006', '25 Oct, 2006', '25 Oct. 2006'
# '%d %B %Y', '%d %B, %Y', # '25 October 2006', '25 October, 2006'
# '%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
@@ -44,7 +44,7 @@ DATETIME_INPUT_FORMATS = (
'%m/%d/%y %H:%M:%S.%f', # '10/25/06 14:30:59.000200'
'%m/%d/%y %H:%M', # '10/25/06 14:30'
'%m/%d/%y', # '10/25/06'
-)
+]
DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = " "
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/ko/formats.py b/django/conf/locale/ko/formats.py
index 0bafa06ab1..e89f644ca5 100644
--- a/django/conf/locale/ko/formats.py
+++ b/django/conf/locale/ko/formats.py
@@ -17,22 +17,22 @@ SHORT_DATETIME_FORMAT = 'Y-n-j H:i'
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
-DATE_INPUT_FORMATS = (
+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'
'%Y년 %m월 %d일', # '2006년 10월 25일', with localized suffix.
-)
-TIME_INPUT_FORMATS = (
+]
+TIME_INPUT_FORMATS = [
'%H:%M:%S', # '14:30:59'
'%H:%M:%S.%f', # '14:30:59.000200'
'%H:%M', # '14:30'
'%H시 %M분 %S초', # '14시 30분 59초'
'%H시 %M분', # '14시 30분'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
@@ -48,7 +48,7 @@ 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분'
-)
+]
DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ','
diff --git a/django/conf/locale/lt/formats.py b/django/conf/locale/lt/formats.py
index 6a34ab09fd..d688669b78 100644
--- a/django/conf/locale/lt/formats.py
+++ b/django/conf/locale/lt/formats.py
@@ -16,18 +16,18 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%Y-%m-%d', '%d.%m.%Y', '%d.%m.%y', # '2006-10-25', '25.10.2006', '25.10.06'
-)
-TIME_INPUT_FORMATS = (
+]
+TIME_INPUT_FORMATS = [
'%H:%M:%S', # '14:30:59'
'%H:%M:%S.%f', # '14:30:59.000200'
'%H:%M', # '14:30'
'%H.%M.%S', # '14.30.59'
'%H.%M.%S.%f', # '14.30.59.000200'
'%H.%M', # '14.30'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
@@ -42,7 +42,7 @@ DATETIME_INPUT_FORMATS = (
'%d.%m.%y %H.%M.%S.%f', # '25.10.06 14.30.59.000200'
'%d.%m.%y %H.%M', # '25.10.06 14.30'
'%d.%m.%y', # '25.10.06'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/lv/formats.py b/django/conf/locale/lv/formats.py
index 28e4d6c3f4..e30a65388c 100644
--- a/django/conf/locale/lv/formats.py
+++ b/django/conf/locale/lv/formats.py
@@ -17,18 +17,18 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%Y-%m-%d', '%d.%m.%Y', '%d.%m.%y', # '2006-10-25', '25.10.2006', '25.10.06'
-)
-TIME_INPUT_FORMATS = (
+]
+TIME_INPUT_FORMATS = [
'%H:%M:%S', # '14:30:59'
'%H:%M:%S.%f', # '14:30:59.000200'
'%H:%M', # '14:30'
'%H.%M.%S', # '14.30.59'
'%H.%M.%S.%f', # '14.30.59.000200'
'%H.%M', # '14.30'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
@@ -43,7 +43,7 @@ DATETIME_INPUT_FORMATS = (
'%d.%m.%y %H.%M.%S.%f', # '25.10.06 14.30.59.000200'
'%d.%m.%y %H.%M', # '25.10.06 14.30'
'%d.%m.%y', # '25.10.06'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = ' ' # Non-breaking space
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/mk/formats.py b/django/conf/locale/mk/formats.py
index ea4b0c3402..2f01147a0a 100644
--- a/django/conf/locale/mk/formats.py
+++ b/django/conf/locale/mk/formats.py
@@ -16,12 +16,12 @@ FIRST_DAY_OF_WEEK = 1
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06'
'%d. %m. %Y', '%d. %m. %y', # '25. 10. 2006', '25. 10. 06'
-)
+]
-DATETIME_INPUT_FORMATS = (
+DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30'
@@ -38,7 +38,7 @@ DATETIME_INPUT_FORMATS = (
'%d. %m. %y %H:%M:%S.%f', # '25. 10. 06 14:30:59.000200'
'%d. %m. %y %H:%M', # '25. 10. 06 14:30'
'%d. %m. %y', # '25. 10. 06'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
diff --git a/django/conf/locale/ml/formats.py b/django/conf/locale/ml/formats.py
index 279cd3c518..63b23fa260 100644
--- a/django/conf/locale/ml/formats.py
+++ b/django/conf/locale/ml/formats.py
@@ -17,14 +17,14 @@ FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
-DATE_INPUT_FORMATS = (
+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'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
@@ -37,7 +37,7 @@ DATETIME_INPUT_FORMATS = (
'%m/%d/%y %H:%M:%S.%f', # '10/25/06 14:30:59.000200'
'%m/%d/%y %H:%M', # '10/25/06 14:30'
'%m/%d/%y', # '10/25/06'
-)
+]
DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ','
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/nb/formats.py b/django/conf/locale/nb/formats.py
index 5bf43af0d4..09fa857b4c 100644
--- a/django/conf/locale/nb/formats.py
+++ b/django/conf/locale/nb/formats.py
@@ -17,13 +17,13 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%Y-%m-%d', '%d.%m.%Y', '%d.%m.%y', # '2006-10-25', '25.10.2006', '25.10.06'
# '%d. %b %Y', '%d %b %Y', # '25. okt 2006', '25 okt 2006'
# '%d. %b. %Y', '%d %b. %Y', # '25. okt. 2006', '25 okt. 2006'
# '%d. %B %Y', '%d %B %Y', # '25. oktober 2006', '25 oktober 2006'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
@@ -36,7 +36,7 @@ DATETIME_INPUT_FORMATS = (
'%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200'
'%d.%m.%y %H:%M', # '25.10.06 14:30'
'%d.%m.%y', # '25.10.06'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/nl/formats.py b/django/conf/locale/nl/formats.py
index d9f54464e6..581848f6e4 100644
--- a/django/conf/locale/nl/formats.py
+++ b/django/conf/locale/nl/formats.py
@@ -16,22 +16,22 @@ FIRST_DAY_OF_WEEK = 1 # Monday (in Dutch 'maandag')
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d-%m-%Y', '%d-%m-%y', # '20-01-2009', '20-01-09'
'%d/%m/%Y', '%d/%m/%y', # '20/01/2009', '20/01/09'
# '%d %b %Y', '%d %b %y', # '20 jan 2009', '20 jan 09'
# '%d %B %Y', '%d %B %y', # '20 januari 2009', '20 januari 09'
-)
+]
# Kept ISO formats as one is in first position
-TIME_INPUT_FORMATS = (
+TIME_INPUT_FORMATS = [
'%H:%M:%S', # '15:23:35'
'%H:%M:%S.%f', # '15:23:35.000200'
'%H.%M:%S', # '15.23:35'
'%H.%M:%S.%f', # '15.23:35.000200'
'%H.%M', # '15.23'
'%H:%M', # '15:23'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
# With time in %H:%M:%S :
'%d-%m-%Y %H:%M:%S', '%d-%m-%y %H:%M:%S', '%Y-%m-%d %H:%M:%S',
# '20-01-2009 15:23:35', '20-01-09 15:23:35', '2009-01-20 15:23:35'
@@ -67,7 +67,7 @@ DATETIME_INPUT_FORMATS = (
'%d/%m/%Y', '%d/%m/%y', '%Y/%m/%d', # '20/01/2009', '20/01/09', '2009/01/20'
# '%d %b %Y', '%d %b %y', # '20 jan 2009', '20 jan 09'
# '%d %B %Y', '%d %B %y', # '20 januari 2009', '20 januari 2009'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/nn/formats.py b/django/conf/locale/nn/formats.py
index ca7d2e294c..b2e654c1e1 100644
--- a/django/conf/locale/nn/formats.py
+++ b/django/conf/locale/nn/formats.py
@@ -17,13 +17,13 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%Y-%m-%d', '%d.%m.%Y', '%d.%m.%y', # '2006-10-25', '25.10.2006', '25.10.06'
# '%d. %b %Y', '%d %b %Y', # '25. okt 2006', '25 okt 2006'
# '%d. %b. %Y', '%d %b. %Y', # '25. okt. 2006', '25 okt. 2006'
# '%d. %B %Y', '%d %B %Y', # '25. oktober 2006', '25 oktober 2006'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
@@ -37,7 +37,7 @@ DATETIME_INPUT_FORMATS = (
'%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200'
'%d.%m.%y %H:%M', # '25.10.06 14:30'
'%d.%m.%y', # '25.10.06'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/pl/formats.py b/django/conf/locale/pl/formats.py
index 3e2c20f6d3..9cc1776494 100644
--- a/django/conf/locale/pl/formats.py
+++ b/django/conf/locale/pl/formats.py
@@ -16,17 +16,17 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06'
'%y-%m-%d', # '06-10-25'
# '%d. %B %Y', '%d. %b. %Y', # '25. October 2006', '25. Oct. 2006'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30'
'%d.%m.%Y', # '25.10.2006'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = ' '
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/pt/formats.py b/django/conf/locale/pt/formats.py
index c9428ef4ea..143351c0cd 100644
--- a/django/conf/locale/pt/formats.py
+++ b/django/conf/locale/pt/formats.py
@@ -17,12 +17,12 @@ FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%Y-%m-%d', '%d/%m/%Y', '%d/%m/%y', # '2006-10-25', '25/10/2006', '25/10/06'
# '%d de %b de %Y', '%d de %b, %Y', # '25 de Out de 2006', '25 Out, 2006'
# '%d de %B de %Y', '%d de %B, %Y', # '25 de Outubro de 2006', '25 de Outubro, 2006'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
@@ -35,7 +35,7 @@ DATETIME_INPUT_FORMATS = (
'%d/%m/%y %H:%M:%S.%f', # '25/10/06 14:30:59.000200'
'%d/%m/%y %H:%M', # '25/10/06 14:30'
'%d/%m/%y', # '25/10/06'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/pt_BR/formats.py b/django/conf/locale/pt_BR/formats.py
index 6057a21056..9f728783c5 100644
--- a/django/conf/locale/pt_BR/formats.py
+++ b/django/conf/locale/pt_BR/formats.py
@@ -16,12 +16,12 @@ FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
# '%d de %b de %Y', '%d de %b, %Y', # '25 de Out de 2006', '25 Out, 2006'
# '%d de %B de %Y', '%d de %B, %Y', # '25 de Outubro de 2006', '25 de Outubro, 2006'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59'
'%d/%m/%Y %H:%M:%S.%f', # '25/10/2006 14:30:59.000200'
'%d/%m/%Y %H:%M', # '25/10/2006 14:30'
@@ -30,7 +30,7 @@ DATETIME_INPUT_FORMATS = (
'%d/%m/%y %H:%M:%S.%f', # '25/10/06 14:30:59.000200'
'%d/%m/%y %H:%M', # '25/10/06 14:30'
'%d/%m/%y', # '25/10/06'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/ru/formats.py b/django/conf/locale/ru/formats.py
index 727ee75b54..07b1181285 100644
--- a/django/conf/locale/ru/formats.py
+++ b/django/conf/locale/ru/formats.py
@@ -16,11 +16,11 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '25.10.2006'
'%d.%m.%y', # '25.10.06'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30'
@@ -29,7 +29,7 @@ DATETIME_INPUT_FORMATS = (
'%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200'
'%d.%m.%y %H:%M', # '25.10.06 14:30'
'%d.%m.%y', # '25.10.06'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/sk/formats.py b/django/conf/locale/sk/formats.py
index f54a8a89e0..04bdceb000 100644
--- a/django/conf/locale/sk/formats.py
+++ b/django/conf/locale/sk/formats.py
@@ -16,17 +16,17 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06'
'%y-%m-%d', # '06-10-25'
# '%d. %B %Y', '%d. %b. %Y', # '25. October 2006', '25. Oct. 2006'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30'
'%d.%m.%Y', # '25.10.2006'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/sl/formats.py b/django/conf/locale/sl/formats.py
index a2027166e0..a4e9973a55 100644
--- a/django/conf/locale/sl/formats.py
+++ b/django/conf/locale/sl/formats.py
@@ -16,13 +16,13 @@ FIRST_DAY_OF_WEEK = 0
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06'
'%d-%m-%Y', # '25-10-2006'
'%d. %m. %Y', '%d. %m. %y', # '25. 10. 2006', '25. 10. 06'
-)
+]
-DATETIME_INPUT_FORMATS = (
+DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30'
@@ -43,7 +43,7 @@ DATETIME_INPUT_FORMATS = (
'%d. %m. %y %H:%M:%S.%f', # '25. 10. 06 14:30:59.000200'
'%d. %m. %y %H:%M', # '25. 10. 06 14:30'
'%d. %m. %y', # '25. 10. 06'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
diff --git a/django/conf/locale/sr/formats.py b/django/conf/locale/sr/formats.py
index 86d63e42f1..5c5e48e20e 100644
--- a/django/conf/locale/sr/formats.py
+++ b/django/conf/locale/sr/formats.py
@@ -16,14 +16,14 @@ FIRST_DAY_OF_WEEK = 1
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d.%m.%Y.', '%d.%m.%y.', # '25.10.2006.', '25.10.06.'
'%d. %m. %Y.', '%d. %m. %y.', # '25. 10. 2006.', '25. 10. 06.'
# '%d. %b %y.', '%d. %B %y.', # '25. Oct 06.', '25. October 06.'
# '%d. %b \'%y.', '%d. %B \'%y.', # '25. Oct '06.', '25. October '06.'
# '%d. %b %Y.', '%d. %B %Y.', # '25. Oct 2006.', '25. October 2006.'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d.%m.%Y. %H:%M:%S', # '25.10.2006. 14:30:59'
'%d.%m.%Y. %H:%M:%S.%f', # '25.10.2006. 14:30:59.000200'
'%d.%m.%Y. %H:%M', # '25.10.2006. 14:30'
@@ -40,7 +40,7 @@ DATETIME_INPUT_FORMATS = (
'%d. %m. %y. %H:%M:%S.%f', # '25. 10. 06. 14:30:59.000200'
'%d. %m. %y. %H:%M', # '25. 10. 06. 14:30'
'%d. %m. %y.', # '25. 10. 06.'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/sr_Latn/formats.py b/django/conf/locale/sr_Latn/formats.py
index 86d63e42f1..5c5e48e20e 100644
--- a/django/conf/locale/sr_Latn/formats.py
+++ b/django/conf/locale/sr_Latn/formats.py
@@ -16,14 +16,14 @@ FIRST_DAY_OF_WEEK = 1
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d.%m.%Y.', '%d.%m.%y.', # '25.10.2006.', '25.10.06.'
'%d. %m. %Y.', '%d. %m. %y.', # '25. 10. 2006.', '25. 10. 06.'
# '%d. %b %y.', '%d. %B %y.', # '25. Oct 06.', '25. October 06.'
# '%d. %b \'%y.', '%d. %B \'%y.', # '25. Oct '06.', '25. October '06.'
# '%d. %b %Y.', '%d. %B %Y.', # '25. Oct 2006.', '25. October 2006.'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d.%m.%Y. %H:%M:%S', # '25.10.2006. 14:30:59'
'%d.%m.%Y. %H:%M:%S.%f', # '25.10.2006. 14:30:59.000200'
'%d.%m.%Y. %H:%M', # '25.10.2006. 14:30'
@@ -40,7 +40,7 @@ DATETIME_INPUT_FORMATS = (
'%d. %m. %y. %H:%M:%S.%f', # '25. 10. 06. 14:30:59.000200'
'%d. %m. %y. %H:%M', # '25. 10. 06. 14:30'
'%d. %m. %y.', # '25. 10. 06.'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/sv/formats.py b/django/conf/locale/sv/formats.py
index 7673d472a1..f2de0bc16b 100644
--- a/django/conf/locale/sv/formats.py
+++ b/django/conf/locale/sv/formats.py
@@ -17,12 +17,12 @@ FIRST_DAY_OF_WEEK = 1
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '2006-10-25'
'%m/%d/%Y', # '10/25/2006'
'%m/%d/%y', # '10/25/06'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
@@ -35,7 +35,7 @@ DATETIME_INPUT_FORMATS = (
'%m/%d/%y %H:%M:%S.%f', # '10/25/06 14:30:59.000200'
'%m/%d/%y %H:%M', # '10/25/06 14:30'
'%m/%d/%y', # '10/25/06'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/tr/formats.py b/django/conf/locale/tr/formats.py
index c01c4a242a..c765f77489 100644
--- a/django/conf/locale/tr/formats.py
+++ b/django/conf/locale/tr/formats.py
@@ -16,17 +16,17 @@ FIRST_DAY_OF_WEEK = 1 # Pazartesi
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
'%y-%m-%d', # '06-10-25'
# '%d %B %Y', '%d %b. %Y', # '25 Ekim 2006', '25 Eki. 2006'
-)
-DATETIME_INPUT_FORMATS = (
+]
+DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59'
'%d/%m/%Y %H:%M:%S.%f', # '25/10/2006 14:30:59.000200'
'%d/%m/%Y %H:%M', # '25/10/2006 14:30'
'%d/%m/%Y', # '25/10/2006'
-)
+]
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
NUMBER_GROUPING = 3
diff --git a/django/conf/locale/zh_Hans/formats.py b/django/conf/locale/zh_Hans/formats.py
index f855dec5b2..b6bac2f90e 100644
--- a/django/conf/locale/zh_Hans/formats.py
+++ b/django/conf/locale/zh_Hans/formats.py
@@ -16,19 +16,19 @@ FIRST_DAY_OF_WEEK = 1 # 星期一 (Monday)
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%Y/%m/%d', # '2016/09/05'
'%Y-%m-%d', # '2016-09-05'
'%Y年%n月%j日', # '2016年9月5日'
-)
+]
-TIME_INPUT_FORMATS = (
+TIME_INPUT_FORMATS = [
'%H:%M', # '20:45'
'%H:%M:%S', # '20:45:29'
'%H:%M:%S.%f', # '20:45:29.000200'
-)
+]
-DATETIME_INPUT_FORMATS = (
+DATETIME_INPUT_FORMATS = [
'%Y/%m/%d %H:%M', # '2016/09/05 20:45'
'%Y-%m-%d %H:%M', # '2016-09-05 20:45'
'%Y年%n月%j日 %H:%M', # '2016年9月5日 14:45'
@@ -38,7 +38,7 @@ DATETIME_INPUT_FORMATS = (
'%Y/%m/%d %H:%M:%S.%f', # '2016/09/05 20:45:29.000200'
'%Y-%m-%d %H:%M:%S.%f', # '2016-09-05 20:45:29.000200'
'%Y年%n月%j日 %H:%n:%S.%f', # '2016年9月5日 20:45:29.000200'
-)
+]
DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ''
diff --git a/django/conf/locale/zh_Hant/formats.py b/django/conf/locale/zh_Hant/formats.py
index f855dec5b2..b6bac2f90e 100644
--- a/django/conf/locale/zh_Hant/formats.py
+++ b/django/conf/locale/zh_Hant/formats.py
@@ -16,19 +16,19 @@ FIRST_DAY_OF_WEEK = 1 # 星期一 (Monday)
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-DATE_INPUT_FORMATS = (
+DATE_INPUT_FORMATS = [
'%Y/%m/%d', # '2016/09/05'
'%Y-%m-%d', # '2016-09-05'
'%Y年%n月%j日', # '2016年9月5日'
-)
+]
-TIME_INPUT_FORMATS = (
+TIME_INPUT_FORMATS = [
'%H:%M', # '20:45'
'%H:%M:%S', # '20:45:29'
'%H:%M:%S.%f', # '20:45:29.000200'
-)
+]
-DATETIME_INPUT_FORMATS = (
+DATETIME_INPUT_FORMATS = [
'%Y/%m/%d %H:%M', # '2016/09/05 20:45'
'%Y-%m-%d %H:%M', # '2016-09-05 20:45'
'%Y年%n月%j日 %H:%M', # '2016年9月5日 14:45'
@@ -38,7 +38,7 @@ DATETIME_INPUT_FORMATS = (
'%Y/%m/%d %H:%M:%S.%f', # '2016/09/05 20:45:29.000200'
'%Y-%m-%d %H:%M:%S.%f', # '2016-09-05 20:45:29.000200'
'%Y年%n月%j日 %H:%n:%S.%f', # '2016年9月5日 20:45:29.000200'
-)
+]
DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = ''
diff --git a/django/conf/project_template/project_name/settings.py b/django/conf/project_template/project_name/settings.py
index a0a3056075..9d4b38d171 100644
--- a/django/conf/project_template/project_name/settings.py
+++ b/django/conf/project_template/project_name/settings.py
@@ -31,16 +31,16 @@ ALLOWED_HOSTS = []
# Application definition
-INSTALLED_APPS = (
+INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
-)
+]
-MIDDLEWARE_CLASSES = (
+MIDDLEWARE_CLASSES = [
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
@@ -49,7 +49,7 @@ MIDDLEWARE_CLASSES = (
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
-)
+]
ROOT_URLCONF = '{{ project_name }}.urls'
diff --git a/django/contrib/auth/checks.py b/django/contrib/auth/checks.py
index 853a675f88..2d47377c9a 100644
--- a/django/contrib/auth/checks.py
+++ b/django/contrib/auth/checks.py
@@ -37,7 +37,7 @@ def check_user_model(**kwargs):
# Check that the username field is unique
if not cls._meta.get_field(cls.USERNAME_FIELD).unique:
if (settings.AUTHENTICATION_BACKENDS ==
- ('django.contrib.auth.backends.ModelBackend',)):
+ ['django.contrib.auth.backends.ModelBackend']):
errors.append(
checks.Error(
"'%s.%s' must be unique because it is named as the 'USERNAME_FIELD'." % (
diff --git a/django/contrib/auth/tests/settings.py b/django/contrib/auth/tests/settings.py
index ce2aa7d152..b3e1eff156 100644
--- a/django/contrib/auth/tests/settings.py
+++ b/django/contrib/auth/tests/settings.py
@@ -3,19 +3,19 @@ import os
from django.utils._os import upath
-AUTH_MIDDLEWARE_CLASSES = (
+AUTH_MIDDLEWARE_CLASSES = [
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
-)
+]
AUTH_TEMPLATES = [{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(os.path.dirname(upath(__file__)), 'templates')],
'APP_DIRS': True,
'OPTIONS': {
- 'context_processors': (
+ 'context_processors': [
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
- ),
+ ],
},
}]
diff --git a/django/contrib/auth/tests/test_auth_backends.py b/django/contrib/auth/tests/test_auth_backends.py
index d3b6c5de0c..73fabe11b0 100644
--- a/django/contrib/auth/tests/test_auth_backends.py
+++ b/django/contrib/auth/tests/test_auth_backends.py
@@ -10,7 +10,7 @@ from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ImproperlyConfigured, PermissionDenied
from django.contrib.auth import authenticate, BACKEND_SESSION_KEY, get_user
from django.http import HttpRequest
-from django.test import TestCase, override_settings
+from django.test import TestCase, modify_settings, override_settings
from django.contrib.auth.hashers import MD5PasswordHasher
@@ -34,8 +34,8 @@ class BaseModelBackendTest(object):
backend = 'django.contrib.auth.backends.ModelBackend'
def setUp(self):
- self.curr_auth = settings.AUTHENTICATION_BACKENDS
- settings.AUTHENTICATION_BACKENDS = (self.backend,)
+ self.curr_auth = list(settings.AUTHENTICATION_BACKENDS)
+ settings.AUTHENTICATION_BACKENDS = [self.backend]
self.create_users()
def tearDown(self):
@@ -172,7 +172,7 @@ class BaseModelBackendTest(object):
user = self.UserModel._default_manager.get(pk=self.superuser.pk)
self.assertEqual(len(user.get_all_permissions()), len(Permission.objects.all()))
- @override_settings(PASSWORD_HASHERS=('django.contrib.auth.tests.test_auth_backends.CountingMD5PasswordHasher',))
+ @override_settings(PASSWORD_HASHERS=['django.contrib.auth.tests.test_auth_backends.CountingMD5PasswordHasher'])
def test_authentication_timing(self):
"""Hasher is run once regardless of whether the user exists. Refs #20760."""
# Re-set the password, because this tests overrides PASSWORD_HASHERS
@@ -337,21 +337,20 @@ class SimpleRowlevelBackend(object):
@skipIfCustomUser
+@modify_settings(AUTHENTICATION_BACKENDS={
+ 'append': 'django.contrib.auth.tests.test_auth_backends.SimpleRowlevelBackend',
+})
class RowlevelBackendTest(TestCase):
"""
Tests for auth backend that supports object level permissions
"""
- backend = 'django.contrib.auth.tests.test_auth_backends.SimpleRowlevelBackend'
def setUp(self):
- self.curr_auth = settings.AUTHENTICATION_BACKENDS
- settings.AUTHENTICATION_BACKENDS = tuple(self.curr_auth) + (self.backend,)
self.user1 = User.objects.create_user('test', 'test@example.com', 'test')
self.user2 = User.objects.create_user('test2', 'test2@example.com', 'test')
self.user3 = User.objects.create_user('test3', 'test3@example.com', 'test')
def tearDown(self):
- settings.AUTHENTICATION_BACKENDS = self.curr_auth
# The get_group_permissions test messes with ContentTypes, which will
# be cached; flush the cache to ensure there are no side effects
# Refs #14975, #14925
@@ -377,21 +376,17 @@ class RowlevelBackendTest(TestCase):
self.assertEqual(self.user3.get_group_permissions(TestObj()), {'group_perm'})
+@override_settings(
+ AUTHENTICATION_BACKENDS=['django.contrib.auth.tests.test_auth_backends.SimpleRowlevelBackend'],
+)
class AnonymousUserBackendTest(TestCase):
"""
Tests for AnonymousUser delegating to backend.
"""
- backend = 'django.contrib.auth.tests.test_auth_backends.SimpleRowlevelBackend'
-
def setUp(self):
- self.curr_auth = settings.AUTHENTICATION_BACKENDS
- settings.AUTHENTICATION_BACKENDS = (self.backend,)
self.user1 = AnonymousUser()
- def tearDown(self):
- settings.AUTHENTICATION_BACKENDS = self.curr_auth
-
def test_has_perm(self):
self.assertEqual(self.user1.has_perm('perm', TestObj()), False)
self.assertEqual(self.user1.has_perm('anon', TestObj()), True)
@@ -422,22 +417,17 @@ class NoBackendsTest(TestCase):
@skipIfCustomUser
+@override_settings(AUTHENTICATION_BACKENDS=['django.contrib.auth.tests.test_auth_backends.SimpleRowlevelBackend'])
class InActiveUserBackendTest(TestCase):
"""
Tests for an inactive user
"""
- backend = 'django.contrib.auth.tests.test_auth_backends.SimpleRowlevelBackend'
def setUp(self):
- self.curr_auth = settings.AUTHENTICATION_BACKENDS
- settings.AUTHENTICATION_BACKENDS = (self.backend,)
self.user1 = User.objects.create_user('test', 'test@example.com', 'test')
self.user1.is_active = False
self.user1.save()
- def tearDown(self):
- settings.AUTHENTICATION_BACKENDS = self.curr_auth
-
def test_has_perm(self):
self.assertEqual(self.user1.has_perm('perm', TestObj()), False)
self.assertEqual(self.user1.has_perm('inactive', TestObj()), True)
@@ -476,19 +466,16 @@ class PermissionDeniedBackendTest(TestCase):
self.user1 = User.objects.create_user('test', 'test@example.com', 'test')
self.user1.save()
- @override_settings(AUTHENTICATION_BACKENDS=(backend, ) +
- tuple(settings.AUTHENTICATION_BACKENDS))
+ @modify_settings(AUTHENTICATION_BACKENDS={'prepend': backend})
def test_permission_denied(self):
"user is not authenticated after a backend raises permission denied #2550"
self.assertEqual(authenticate(username='test', password='test'), None)
- @override_settings(AUTHENTICATION_BACKENDS=tuple(
- settings.AUTHENTICATION_BACKENDS) + (backend, ))
+ @modify_settings(AUTHENTICATION_BACKENDS={'append': backend})
def test_authenticates(self):
self.assertEqual(authenticate(username='test', password='test'), self.user1)
- @override_settings(AUTHENTICATION_BACKENDS=(backend, ) +
- tuple(settings.AUTHENTICATION_BACKENDS))
+ @modify_settings(AUTHENTICATION_BACKENDS={'prepend': backend})
def test_has_perm_denied(self):
content_type = ContentType.objects.get_for_model(Group)
perm = Permission.objects.create(name='test', content_type=content_type, codename='test')
@@ -497,8 +484,7 @@ class PermissionDeniedBackendTest(TestCase):
self.assertIs(self.user1.has_perm('auth.test'), False)
self.assertIs(self.user1.has_module_perms('auth'), False)
- @override_settings(AUTHENTICATION_BACKENDS=tuple(
- settings.AUTHENTICATION_BACKENDS) + (backend, ))
+ @modify_settings(AUTHENTICATION_BACKENDS={'append': backend})
def test_has_perm(self):
content_type = ContentType.objects.get_for_model(Group)
perm = Permission.objects.create(name='test', content_type=content_type, codename='test')
@@ -528,7 +514,7 @@ class ChangedBackendSettingsTest(TestCase):
self.TEST_EMAIL,
self.TEST_PASSWORD)
- @override_settings(AUTHENTICATION_BACKENDS=(backend, ))
+ @override_settings(AUTHENTICATION_BACKENDS=[backend])
def test_changed_backend_settings(self):
"""
Tests that removing a backend configured in AUTHENTICATION_BACKENDS
@@ -546,8 +532,8 @@ class ChangedBackendSettingsTest(TestCase):
request.session = self.client.session
# Remove NewModelBackend
- with self.settings(AUTHENTICATION_BACKENDS=(
- 'django.contrib.auth.backends.ModelBackend',)):
+ with self.settings(AUTHENTICATION_BACKENDS=[
+ 'django.contrib.auth.backends.ModelBackend']):
# Get the user from the request
user = get_user(request)
@@ -581,7 +567,7 @@ class TypeErrorBackendTest(TestCase):
def setUp(self):
self.user1 = User.objects.create_user('test', 'test@example.com', 'test')
- @override_settings(AUTHENTICATION_BACKENDS=(backend, ))
+ @override_settings(AUTHENTICATION_BACKENDS=[backend])
def test_type_error_raised(self):
self.assertRaises(TypeError, authenticate, username='test', password='test')
@@ -622,7 +608,7 @@ class ImportedBackendTests(TestCase):
backend = 'django.contrib.auth.tests.backend_alias.ImportedModelBackend'
- @override_settings(AUTHENTICATION_BACKENDS=(backend, ))
+ @override_settings(AUTHENTICATION_BACKENDS=[backend])
def test_backend_path(self):
username = 'username'
password = 'password'
diff --git a/django/contrib/auth/tests/test_context_processors.py b/django/contrib/auth/tests/test_context_processors.py
index f96eac9db7..2f7e5ab4b2 100644
--- a/django/contrib/auth/tests/test_context_processors.py
+++ b/django/contrib/auth/tests/test_context_processors.py
@@ -60,7 +60,7 @@ class PermWrapperTests(TestCase):
@skipIfCustomUser
@override_settings(
- PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',),
+ PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'],
ROOT_URLCONF='django.contrib.auth.tests.urls',
TEMPLATES=AUTH_TEMPLATES,
USE_TZ=False, # required for loading the fixture
diff --git a/django/contrib/auth/tests/test_forms.py b/django/contrib/auth/tests/test_forms.py
index 93ce9ad073..601c0868d7 100644
--- a/django/contrib/auth/tests/test_forms.py
+++ b/django/contrib/auth/tests/test_forms.py
@@ -21,7 +21,7 @@ from .utils import skipIfCustomUser
@skipIfCustomUser
-@override_settings(USE_TZ=False, PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
+@override_settings(USE_TZ=False, PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'])
class UserCreationFormTest(TestCase):
fixtures = ['authtestdata.json']
@@ -89,7 +89,7 @@ class UserCreationFormTest(TestCase):
@skipIfCustomUser
-@override_settings(USE_TZ=False, PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
+@override_settings(USE_TZ=False, PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'])
class AuthenticationFormTest(TestCase):
fixtures = ['authtestdata.json']
@@ -202,7 +202,7 @@ class AuthenticationFormTest(TestCase):
@skipIfCustomUser
-@override_settings(USE_TZ=False, PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
+@override_settings(USE_TZ=False, PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'])
class SetPasswordFormTest(TestCase):
fixtures = ['authtestdata.json']
@@ -230,7 +230,7 @@ class SetPasswordFormTest(TestCase):
@skipIfCustomUser
-@override_settings(USE_TZ=False, PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
+@override_settings(USE_TZ=False, PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'])
class PasswordChangeFormTest(TestCase):
fixtures = ['authtestdata.json']
@@ -279,7 +279,7 @@ class PasswordChangeFormTest(TestCase):
@skipIfCustomUser
-@override_settings(USE_TZ=False, PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
+@override_settings(USE_TZ=False, PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'])
class UserChangeFormTest(TestCase):
fixtures = ['authtestdata.json']
@@ -359,7 +359,7 @@ class UserChangeFormTest(TestCase):
@skipIfCustomUser
@override_settings(
- PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',),
+ PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'],
TEMPLATES=AUTH_TEMPLATES,
USE_TZ=False,
)
diff --git a/django/contrib/auth/tests/test_remote_user.py b/django/contrib/auth/tests/test_remote_user.py
index 790e5d0d53..4e6f86fd0c 100644
--- a/django/contrib/auth/tests/test_remote_user.py
+++ b/django/contrib/auth/tests/test_remote_user.py
@@ -23,10 +23,15 @@ class RemoteUserTest(TestCase):
known_user2 = 'knownuser2'
def setUp(self):
- self.curr_middleware = settings.MIDDLEWARE_CLASSES
- self.curr_auth = settings.AUTHENTICATION_BACKENDS
- settings.MIDDLEWARE_CLASSES += (self.middleware,)
- settings.AUTHENTICATION_BACKENDS += (self.backend,)
+ self.curr_middleware = list(settings.MIDDLEWARE_CLASSES)
+ self.curr_auth = list(settings.AUTHENTICATION_BACKENDS)
+ settings.MIDDLEWARE_CLASSES = settings.MIDDLEWARE_CLASSES + [self.middleware]
+ settings.AUTHENTICATION_BACKENDS = settings.AUTHENTICATION_BACKENDS + [self.backend]
+
+ def tearDown(self):
+ """Restores settings to avoid breaking other tests."""
+ settings.MIDDLEWARE_CLASSES = self.curr_middleware
+ settings.AUTHENTICATION_BACKENDS = self.curr_auth
def test_no_remote_user(self):
"""
@@ -143,11 +148,6 @@ class RemoteUserTest(TestCase):
# In backends that do not create new users, it is '' (anonymous user)
self.assertNotEqual(response.context['user'].username, 'knownuser')
- def tearDown(self):
- """Restores settings to avoid breaking other tests."""
- settings.MIDDLEWARE_CLASSES = self.curr_middleware
- settings.AUTHENTICATION_BACKENDS = self.curr_auth
-
class RemoteUserNoCreateBackend(RemoteUserBackend):
"""Backend that doesn't create unknown users."""
diff --git a/django/contrib/auth/tests/test_signals.py b/django/contrib/auth/tests/test_signals.py
index 04c5b89e0b..e3c89f2366 100644
--- a/django/contrib/auth/tests/test_signals.py
+++ b/django/contrib/auth/tests/test_signals.py
@@ -8,7 +8,7 @@ from django.test import override_settings
@skipIfCustomUser
@override_settings(USE_TZ=False,
- PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',),
+ PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'],
ROOT_URLCONF='django.contrib.auth.tests.urls')
class SignalTestCase(TestCase):
fixtures = ['authtestdata.json']
diff --git a/django/contrib/auth/tests/test_templates.py b/django/contrib/auth/tests/test_templates.py
index e2bb466d68..409a1705f3 100644
--- a/django/contrib/auth/tests/test_templates.py
+++ b/django/contrib/auth/tests/test_templates.py
@@ -14,7 +14,7 @@ from django.utils.http import urlsafe_base64_encode
@skipIfCustomUser
@override_settings(
- PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',),
+ PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'],
ROOT_URLCONF='django.contrib.auth.tests.urls',
)
class AuthTemplateTests(TestCase):
diff --git a/django/contrib/auth/tests/test_views.py b/django/contrib/auth/tests/test_views.py
index e5538517d0..fd01909c2b 100644
--- a/django/contrib/auth/tests/test_views.py
+++ b/django/contrib/auth/tests/test_views.py
@@ -22,7 +22,9 @@ from django.utils.encoding import force_text
from django.utils.http import urlquote
from django.utils.six.moves.urllib.parse import urlparse, ParseResult
from django.utils.translation import LANGUAGE_SESSION_KEY
-from django.test import TestCase, ignore_warnings, override_settings
+from django.test import (
+ TestCase, ignore_warnings, modify_settings, override_settings,
+)
from django.test.utils import patch_logger
from django.middleware.csrf import CsrfViewMiddleware
from django.contrib.sessions.middleware import SessionMiddleware
@@ -34,13 +36,13 @@ from .utils import skipIfCustomUser
@override_settings(
- LANGUAGES=(
+ LANGUAGES=[
('en', 'English'),
- ),
+ ],
LANGUAGE_CODE='en',
TEMPLATES=AUTH_TEMPLATES,
USE_TZ=False,
- PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',),
+ PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'],
ROOT_URLCONF='django.contrib.auth.tests.urls',
)
class AuthViewsTestCase(TestCase):
@@ -444,9 +446,9 @@ class ChangePasswordTest(AuthViewsTestCase):
self.assertURLEqual(response.url, '/password_reset/')
-@override_settings(MIDDLEWARE_CLASSES=list(settings.MIDDLEWARE_CLASSES) + [
- 'django.contrib.auth.middleware.SessionAuthenticationMiddleware'
-])
+@modify_settings(MIDDLEWARE_CLASSES={
+ 'append': 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
+})
class SessionAuthenticationTests(AuthViewsTestCase):
def test_user_password_change_updates_session(self):
"""
@@ -815,14 +817,14 @@ class LogoutTest(AuthViewsTestCase):
self.assertEqual(self.client.session[LANGUAGE_SESSION_KEY], 'pl')
+# Redirect in test_user_change_password will fail if session auth hash
+# isn't updated after password change (#21649)
@skipIfCustomUser
+@modify_settings(MIDDLEWARE_CLASSES={
+ 'append': 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
+})
@override_settings(
- # Redirect in test_user_change_password will fail if session auth hash
- # isn't updated after password change (#21649)
- MIDDLEWARE_CLASSES=list(settings.MIDDLEWARE_CLASSES) + [
- 'django.contrib.auth.middleware.SessionAuthenticationMiddleware'
- ],
- PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',),
+ PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'],
ROOT_URLCONF='django.contrib.auth.tests.urls_admin',
)
class ChangelistTests(AuthViewsTestCase):
diff --git a/django/contrib/flatpages/tests/test_csrf.py b/django/contrib/flatpages/tests/test_csrf.py
index 7b35f621fd..b9d7f32327 100644
--- a/django/contrib/flatpages/tests/test_csrf.py
+++ b/django/contrib/flatpages/tests/test_csrf.py
@@ -8,14 +8,14 @@ from .settings import FLATPAGES_TEMPLATES
@override_settings(
LOGIN_URL='/accounts/login/',
- MIDDLEWARE_CLASSES=(
+ 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.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
- ),
+ ],
ROOT_URLCONF='django.contrib.flatpages.tests.urls',
CSRF_FAILURE_VIEW='django.views.csrf.csrf_failure',
TEMPLATES=FLATPAGES_TEMPLATES,
diff --git a/django/contrib/flatpages/tests/test_forms.py b/django/contrib/flatpages/tests/test_forms.py
index 8a6db742fa..09f500c6ae 100644
--- a/django/contrib/flatpages/tests/test_forms.py
+++ b/django/contrib/flatpages/tests/test_forms.py
@@ -37,7 +37,7 @@ class FlatpageAdminFormTests(TestCase):
self.assertEqual(form.errors['url'], ["URL is missing a leading slash."])
@override_settings(APPEND_SLASH=True,
- MIDDLEWARE_CLASSES=('django.middleware.common.CommonMiddleware',))
+ MIDDLEWARE_CLASSES=['django.middleware.common.CommonMiddleware'])
def test_flatpage_requires_trailing_slash_with_append_slash(self):
form = FlatpageForm(data=dict(url='/no_trailing_slash', **self.form_data))
with translation.override('en'):
@@ -45,7 +45,7 @@ class FlatpageAdminFormTests(TestCase):
self.assertEqual(form.errors['url'], ["URL is missing a trailing slash."])
@override_settings(APPEND_SLASH=False,
- MIDDLEWARE_CLASSES=('django.middleware.common.CommonMiddleware',))
+ MIDDLEWARE_CLASSES=['django.middleware.common.CommonMiddleware'])
def test_flatpage_doesnt_requires_trailing_slash_without_append_slash(self):
form = FlatpageForm(data=dict(url='/no_trailing_slash', **self.form_data))
self.assertTrue(form.is_valid())
diff --git a/django/contrib/flatpages/tests/test_middleware.py b/django/contrib/flatpages/tests/test_middleware.py
index 0e8415b075..f132aa07ac 100644
--- a/django/contrib/flatpages/tests/test_middleware.py
+++ b/django/contrib/flatpages/tests/test_middleware.py
@@ -9,14 +9,14 @@ from .settings import FLATPAGES_TEMPLATES
@override_settings(
LOGIN_URL='/accounts/login/',
- MIDDLEWARE_CLASSES=(
+ 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.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
- ),
+ ],
ROOT_URLCONF='django.contrib.flatpages.tests.urls',
TEMPLATES=FLATPAGES_TEMPLATES,
SITE_ID=1,
@@ -87,14 +87,14 @@ class FlatpageMiddlewareTests(TestCase):
@override_settings(
APPEND_SLASH=True,
LOGIN_URL='/accounts/login/',
- MIDDLEWARE_CLASSES=(
+ 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.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
- ),
+ ],
ROOT_URLCONF='django.contrib.flatpages.tests.urls',
TEMPLATES=FLATPAGES_TEMPLATES,
SITE_ID=1,
diff --git a/django/contrib/flatpages/tests/test_templatetags.py b/django/contrib/flatpages/tests/test_templatetags.py
index f771adbafb..a4a65ce840 100644
--- a/django/contrib/flatpages/tests/test_templatetags.py
+++ b/django/contrib/flatpages/tests/test_templatetags.py
@@ -7,14 +7,14 @@ from .settings import FLATPAGES_TEMPLATES
@override_settings(
- MIDDLEWARE_CLASSES=(
+ 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.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
- ),
+ ],
ROOT_URLCONF='django.contrib.flatpages.tests.urls',
TEMPLATES=FLATPAGES_TEMPLATES,
SITE_ID=1,
diff --git a/django/contrib/flatpages/tests/test_views.py b/django/contrib/flatpages/tests/test_views.py
index b6fb25f9c3..26c071c311 100644
--- a/django/contrib/flatpages/tests/test_views.py
+++ b/django/contrib/flatpages/tests/test_views.py
@@ -9,14 +9,14 @@ from .settings import FLATPAGES_TEMPLATES
@override_settings(
LOGIN_URL='/accounts/login/',
- MIDDLEWARE_CLASSES=(
+ 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',
# no 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware'
- ),
+ ],
ROOT_URLCONF='django.contrib.flatpages.tests.urls',
TEMPLATES=FLATPAGES_TEMPLATES,
SITE_ID=1,
@@ -75,14 +75,14 @@ class FlatpageViewTests(TestCase):
@override_settings(
APPEND_SLASH=True,
LOGIN_URL='/accounts/login/',
- MIDDLEWARE_CLASSES=(
+ 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',
# no 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware'
- ),
+ ],
ROOT_URLCONF='django.contrib.flatpages.tests.urls',
TEMPLATES=FLATPAGES_TEMPLATES,
SITE_ID=1,
diff --git a/django/core/management/commands/makemessages.py b/django/core/management/commands/makemessages.py
index af31402f66..4e46c66114 100644
--- a/django/core/management/commands/makemessages.py
+++ b/django/core/management/commands/makemessages.py
@@ -283,7 +283,7 @@ class Command(BaseCommand):
self.default_locale_path = self.locale_paths[0]
self.invoked_for_django = True
else:
- self.locale_paths.extend(list(settings.LOCALE_PATHS))
+ self.locale_paths.extend(settings.LOCALE_PATHS)
# Allow to run makemessages inside an app dir
if os.path.isdir('locale'):
self.locale_paths.append(os.path.abspath('locale'))
diff --git a/django/templatetags/i18n.py b/django/templatetags/i18n.py
index ecaf84a035..aa0a34ef40 100644
--- a/django/templatetags/i18n.py
+++ b/django/templatetags/i18n.py
@@ -231,7 +231,7 @@ def do_get_language_info_list(parser, token):
"""
This will store a list of language information dictionaries for the given
language codes in a context variable. The language codes can be specified
- either as a list of strings or a settings.LANGUAGES style tuple (or any
+ either as a list of strings or a settings.LANGUAGES style list (or any
sequence of sequences whose first items are language codes).
Usage::
diff --git a/django/utils/formats.py b/django/utils/formats.py
index afbe5da12c..855b1a1cc0 100644
--- a/django/utils/formats.py
+++ b/django/utils/formats.py
@@ -20,14 +20,14 @@ _format_cache = {}
_format_modules_cache = {}
ISO_INPUT_FORMATS = {
- 'DATE_INPUT_FORMATS': ('%Y-%m-%d',),
- 'TIME_INPUT_FORMATS': ('%H:%M:%S', '%H:%M:%S.%f', '%H:%M'),
- 'DATETIME_INPUT_FORMATS': (
+ 'DATE_INPUT_FORMATS': ['%Y-%m-%d'],
+ 'TIME_INPUT_FORMATS': ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'],
+ 'DATETIME_INPUT_FORMATS': [
'%Y-%m-%d %H:%M:%S',
'%Y-%m-%d %H:%M:%S.%f',
'%Y-%m-%d %H:%M',
'%Y-%m-%d'
- ),
+ ],
}
diff --git a/django/views/i18n.py b/django/views/i18n.py
index 8ec2ccab90..7278f6ce1b 100644
--- a/django/views/i18n.py
+++ b/django/views/i18n.py
@@ -205,7 +205,7 @@ def get_javascript_catalog(locale, domain, packages):
path = os.path.join(os.path.dirname(upath(p.__file__)), 'locale')
paths.append(path)
# add the filesystem paths listed in the LOCALE_PATHS setting
- paths.extend(list(reversed(settings.LOCALE_PATHS)))
+ paths.extend(reversed(settings.LOCALE_PATHS))
# first load all english languages files for defaults
for path in paths:
try: