|
42 | 42 | # should be the utf-8 encoded local name for the language. |
43 | 43 | LANGUAGES = ( |
44 | 44 | ('ar', gettext_noop('Arabic')), |
45 | | - ('bn', gettext_noop('Bengali')), |
46 | 45 | ('bg', gettext_noop('Bulgarian')), |
| 46 | + ('bn', gettext_noop('Bengali')), |
| 47 | + ('bs', gettext_noop('Bosnian')), |
47 | 48 | ('ca', gettext_noop('Catalan')), |
48 | 49 | ('cs', gettext_noop('Czech')), |
49 | 50 | ('cy', gettext_noop('Welsh')), |
50 | 51 | ('da', gettext_noop('Danish')), |
51 | 52 | ('de', gettext_noop('German')), |
52 | 53 | ('el', gettext_noop('Greek')), |
53 | 54 | ('en', gettext_noop('English')), |
| 55 | + ('en-gb', gettext_noop('British English')), |
54 | 56 | ('es', gettext_noop('Spanish')), |
| 57 | + ('es-ar', gettext_noop('Argentinian Spanish')), |
55 | 58 | ('et', gettext_noop('Estonian')), |
56 | | - ('es-ar', gettext_noop('Argentinean Spanish')), |
57 | 59 | ('eu', gettext_noop('Basque')), |
58 | 60 | ('fa', gettext_noop('Persian')), |
59 | 61 | ('fi', gettext_noop('Finnish')), |
60 | 62 | ('fr', gettext_noop('French')), |
| 63 | + ('fy-nl', gettext_noop('Frisian')), |
61 | 64 | ('ga', gettext_noop('Irish')), |
62 | 65 | ('gl', gettext_noop('Galician')), |
63 | | - ('hu', gettext_noop('Hungarian')), |
64 | 66 | ('he', gettext_noop('Hebrew')), |
65 | 67 | ('hi', gettext_noop('Hindi')), |
66 | 68 | ('hr', gettext_noop('Croatian')), |
| 69 | + ('hu', gettext_noop('Hungarian')), |
| 70 | + ('id', gettext_noop('Indonesian')), |
67 | 71 | ('is', gettext_noop('Icelandic')), |
68 | 72 | ('it', gettext_noop('Italian')), |
69 | 73 | ('ja', gettext_noop('Japanese')), |
70 | 74 | ('ka', gettext_noop('Georgian')), |
71 | | - ('ko', gettext_noop('Korean')), |
72 | 75 | ('km', gettext_noop('Khmer')), |
73 | 76 | ('kn', gettext_noop('Kannada')), |
74 | | - ('lv', gettext_noop('Latvian')), |
| 77 | + ('ko', gettext_noop('Korean')), |
75 | 78 | ('lt', gettext_noop('Lithuanian')), |
| 79 | + ('lv', gettext_noop('Latvian')), |
76 | 80 | ('mk', gettext_noop('Macedonian')), |
| 81 | + ('ml', gettext_noop('Malayalam')), |
| 82 | + ('mn', gettext_noop('Mongolian')), |
77 | 83 | ('nl', gettext_noop('Dutch')), |
78 | 84 | ('no', gettext_noop('Norwegian')), |
| 85 | + ('nb', gettext_noop('Norwegian Bokmal')), |
| 86 | + ('nn', gettext_noop('Norwegian Nynorsk')), |
79 | 87 | ('pl', gettext_noop('Polish')), |
80 | 88 | ('pt', gettext_noop('Portuguese')), |
81 | 89 | ('pt-br', gettext_noop('Brazilian Portuguese')), |
82 | 90 | ('ro', gettext_noop('Romanian')), |
83 | 91 | ('ru', gettext_noop('Russian')), |
84 | 92 | ('sk', gettext_noop('Slovak')), |
85 | 93 | ('sl', gettext_noop('Slovenian')), |
| 94 | + ('sq', gettext_noop('Albanian')), |
86 | 95 | ('sr', gettext_noop('Serbian')), |
| 96 | + ('sr-latn', gettext_noop('Serbian Latin')), |
87 | 97 | ('sv', gettext_noop('Swedish')), |
88 | 98 | ('ta', gettext_noop('Tamil')), |
89 | 99 | ('te', gettext_noop('Telugu')), |
90 | 100 | ('th', gettext_noop('Thai')), |
91 | 101 | ('tr', gettext_noop('Turkish')), |
92 | 102 | ('uk', gettext_noop('Ukrainian')), |
| 103 | + ('vi', gettext_noop('Vietnamese')), |
93 | 104 | ('zh-cn', gettext_noop('Simplified Chinese')), |
94 | 105 | ('zh-tw', gettext_noop('Traditional Chinese')), |
95 | 106 | ) |
|
103 | 114 | LOCALE_PATHS = () |
104 | 115 | LANGUAGE_COOKIE_NAME = 'django_language' |
105 | 116 |
|
| 117 | +# If you set this to True, Django will format dates, numbers and calendars |
| 118 | +# according to user current locale |
| 119 | +USE_L10N = False |
| 120 | + |
106 | 121 | # Not-necessarily-technical managers of the site. They get broken link |
107 | 122 | # notifications and other various e-mails. |
108 | 123 | MANAGERS = ADMINS |
|
123 | 138 | SEND_BROKEN_LINK_EMAILS = False |
124 | 139 |
|
125 | 140 | # Database connection info. |
| 141 | +# Legacy format |
126 | 142 | DATABASE_ENGINE = '' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
127 | 143 | DATABASE_NAME = '' # Or path to database file if using sqlite3. |
128 | 144 | DATABASE_USER = '' # Not used with sqlite3. |
|
131 | 147 | DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. |
132 | 148 | DATABASE_OPTIONS = {} # Set to empty dictionary for default. |
133 | 149 |
|
| 150 | +# New format |
| 151 | +DATABASES = { |
| 152 | +} |
| 153 | + |
| 154 | +# Classes used to implement db routing behaviour |
| 155 | +DATABASE_ROUTERS = [] |
| 156 | + |
| 157 | +# The email backend to use. For possible shortcuts see django.core.mail. |
| 158 | +# The default is to use the SMTP backend. |
| 159 | +# Third-party backends can be specified by providing a Python path |
| 160 | +# to a module that defines an EmailBackend class. |
| 161 | +EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' |
| 162 | + |
134 | 163 | # Host for sending e-mail. |
135 | 164 | EMAIL_HOST = 'localhost' |
136 | 165 |
|
|
152 | 181 | # See the comments in django/core/template/loader.py for interface |
153 | 182 | # documentation. |
154 | 183 | TEMPLATE_LOADERS = ( |
155 | | - 'django.template.loaders.filesystem.load_template_source', |
156 | | - 'django.template.loaders.app_directories.load_template_source', |
157 | | -# 'django.template.loaders.eggs.load_template_source', |
| 184 | + 'django.template.loaders.filesystem.Loader', |
| 185 | + 'django.template.loaders.app_directories.Loader', |
| 186 | +# 'django.template.loaders.eggs.Loader', |
158 | 187 | ) |
159 | 188 |
|
160 | 189 | # List of processors used by RequestContext to populate the context. |
161 | 190 | # Each one should be a callable that takes the request object as its |
162 | 191 | # only parameter and returns a dictionary to add to the context. |
163 | 192 | TEMPLATE_CONTEXT_PROCESSORS = ( |
164 | | - 'django.core.context_processors.auth', |
| 193 | + 'django.contrib.auth.context_processors.auth', |
165 | 194 | 'django.core.context_processors.debug', |
166 | 195 | 'django.core.context_processors.i18n', |
167 | 196 | 'django.core.context_processors.media', |
168 | 197 | # 'django.core.context_processors.request', |
| 198 | + 'django.contrib.messages.context_processors.messages', |
169 | 199 | ) |
170 | 200 |
|
171 | 201 | # Output to use in template system for invalid (e.g. misspelled) variables. |
|
228 | 258 | # Default file storage mechanism that holds media. |
229 | 259 | DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' |
230 | 260 |
|
231 | | -# Absolute path to the directory that holds media. |
| 261 | +# Absolute filesystem path to the directory that will hold user-uploaded files. |
232 | 262 | # Example: "/home/media/media.lawrence.com/" |
233 | 263 | MEDIA_ROOT = '' |
234 | 264 |
|
|
255 | 285 | # you'd pass directly to os.chmod; see http://docs.python.org/lib/os-file-dir.html. |
256 | 286 | FILE_UPLOAD_PERMISSIONS = None |
257 | 287 |
|
| 288 | +# Python module path where user will place custom format definition. |
| 289 | +# The directory where this setting is pointing should contain subdirectories |
| 290 | +# named as the locales, containing a formats.py file |
| 291 | +# (i.e. "myproject.locale" for myproject/locale/en/formats.py etc. use) |
| 292 | +FORMAT_MODULE_PATH = None |
| 293 | + |
258 | 294 | # Default formatting for date objects. See all available format strings here: |
259 | | -# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now |
| 295 | +# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date |
260 | 296 | DATE_FORMAT = 'N j, Y' |
261 | 297 |
|
262 | 298 | # Default formatting for datetime objects. See all available format strings here: |
263 | | -# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now |
| 299 | +# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date |
264 | 300 | DATETIME_FORMAT = 'N j, Y, P' |
265 | 301 |
|
266 | 302 | # Default formatting for time objects. See all available format strings here: |
267 | | -# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now |
| 303 | +# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date |
268 | 304 | TIME_FORMAT = 'P' |
269 | 305 |
|
270 | 306 | # Default formatting for date objects when only the year and month are relevant. |
271 | 307 | # See all available format strings here: |
272 | | -# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now |
| 308 | +# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date |
273 | 309 | YEAR_MONTH_FORMAT = 'F Y' |
274 | 310 |
|
275 | 311 | # Default formatting for date objects when only the month and day are relevant. |
276 | 312 | # See all available format strings here: |
277 | | -# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now |
| 313 | +# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date |
278 | 314 | MONTH_DAY_FORMAT = 'F j' |
279 | 315 |
|
| 316 | +# Default short formatting for date objects. See all available format strings here: |
| 317 | +# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date |
| 318 | +SHORT_DATE_FORMAT = 'm/d/Y' |
| 319 | + |
| 320 | +# Default short formatting for datetime objects. |
| 321 | +# See all available format strings here: |
| 322 | +# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date |
| 323 | +SHORT_DATETIME_FORMAT = 'm/d/Y P' |
| 324 | + |
| 325 | +# Default formats to be used when parsing dates from input boxes, in order |
| 326 | +# See all available format string here: |
| 327 | +# http://docs.python.org/library/datetime.html#strftime-behavior |
| 328 | +# * Note that these format strings are different from the ones to display dates |
| 329 | +DATE_INPUT_FORMATS = ( |
| 330 | + '%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', # '2006-10-25', '10/25/2006', '10/25/06' |
| 331 | + '%b %d %Y', '%b %d, %Y', # 'Oct 25 2006', 'Oct 25, 2006' |
| 332 | + '%d %b %Y', '%d %b, %Y', # '25 Oct 2006', '25 Oct, 2006' |
| 333 | + '%B %d %Y', '%B %d, %Y', # 'October 25 2006', 'October 25, 2006' |
| 334 | + '%d %B %Y', '%d %B, %Y', # '25 October 2006', '25 October, 2006' |
| 335 | +) |
| 336 | + |
| 337 | +# Default formats to be used when parsing times from input boxes, in order |
| 338 | +# See all available format string here: |
| 339 | +# http://docs.python.org/library/datetime.html#strftime-behavior |
| 340 | +# * Note that these format strings are different from the ones to display dates |
| 341 | +TIME_INPUT_FORMATS = ( |
| 342 | + '%H:%M:%S', # '14:30:59' |
| 343 | + '%H:%M', # '14:30' |
| 344 | +) |
| 345 | + |
| 346 | +# Default formats to be used when parsing dates and times from input boxes, |
| 347 | +# in order |
| 348 | +# See all available format string here: |
| 349 | +# http://docs.python.org/library/datetime.html#strftime-behavior |
| 350 | +# * Note that these format strings are different from the ones to display dates |
| 351 | +DATETIME_INPUT_FORMATS = ( |
| 352 | + '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' |
| 353 | + '%Y-%m-%d %H:%M', # '2006-10-25 14:30' |
| 354 | + '%Y-%m-%d', # '2006-10-25' |
| 355 | + '%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59' |
| 356 | + '%m/%d/%Y %H:%M', # '10/25/2006 14:30' |
| 357 | + '%m/%d/%Y', # '10/25/2006' |
| 358 | + '%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59' |
| 359 | + '%m/%d/%y %H:%M', # '10/25/06 14:30' |
| 360 | + '%m/%d/%y', # '10/25/06' |
| 361 | +) |
| 362 | + |
| 363 | +# First day of week, to be used on calendars |
| 364 | +# 0 means Sunday, 1 means Monday... |
| 365 | +FIRST_DAY_OF_WEEK = 0 |
| 366 | + |
| 367 | +# Decimal separator symbol |
| 368 | +DECIMAL_SEPARATOR = '.' |
| 369 | + |
| 370 | +# Boolean that sets whether to add thousand separator when formatting numbers |
| 371 | +USE_THOUSAND_SEPARATOR = False |
| 372 | + |
| 373 | +# Number of digits that will be together, when spliting them by |
| 374 | +# THOUSAND_SEPARATOR. 0 means no grouping, 3 means splitting by thousands... |
| 375 | +NUMBER_GROUPING = 0 |
| 376 | + |
| 377 | +# Thousand separator symbol |
| 378 | +THOUSAND_SEPARATOR = ',' |
| 379 | + |
280 | 380 | # Do you want to manage transactions manually? |
281 | 381 | # Hint: you really don't! |
282 | 382 | TRANSACTIONS_MANAGED = False |
|
290 | 390 | DEFAULT_TABLESPACE = '' |
291 | 391 | DEFAULT_INDEX_TABLESPACE = '' |
292 | 392 |
|
| 393 | +USE_X_FORWARDED_HOST = False |
| 394 | + |
293 | 395 | ############## |
294 | 396 | # MIDDLEWARE # |
295 | 397 | ############## |
|
300 | 402 | MIDDLEWARE_CLASSES = ( |
301 | 403 | 'django.middleware.common.CommonMiddleware', |
302 | 404 | 'django.contrib.sessions.middleware.SessionMiddleware', |
| 405 | + 'django.middleware.csrf.CsrfViewMiddleware', |
303 | 406 | 'django.contrib.auth.middleware.AuthenticationMiddleware', |
| 407 | + 'django.contrib.messages.middleware.MessageMiddleware', |
304 | 408 | # 'django.middleware.http.ConditionalGetMiddleware', |
305 | 409 | # 'django.middleware.gzip.GZipMiddleware', |
306 | 410 | ) |
|
374 | 478 | # The number of days a password reset link is valid for |
375 | 479 | PASSWORD_RESET_TIMEOUT_DAYS = 3 |
376 | 480 |
|
| 481 | +######## |
| 482 | +# CSRF # |
| 483 | +######## |
| 484 | + |
| 485 | +# Dotted path to callable to be used as view when a request is |
| 486 | +# rejected by the CSRF middleware. |
| 487 | +CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure' |
| 488 | + |
| 489 | +# Name and domain for CSRF cookie. |
| 490 | +CSRF_COOKIE_NAME = 'csrftoken' |
| 491 | +CSRF_COOKIE_DOMAIN = None |
| 492 | + |
| 493 | +############ |
| 494 | +# MESSAGES # |
| 495 | +############ |
| 496 | + |
| 497 | +# Class to use as messges backend |
| 498 | +MESSAGE_STORAGE = 'django.contrib.messages.storage.user_messages.LegacyFallbackStorage' |
| 499 | + |
| 500 | +# Default values of MESSAGE_LEVEL and MESSAGE_TAGS are defined within |
| 501 | +# django.contrib.messages to avoid imports in this settings file. |
| 502 | + |
377 | 503 | ########### |
378 | 504 | # TESTING # |
379 | 505 | ########### |
380 | 506 |
|
381 | | -# The name of the method to use to invoke the test suite |
382 | | -TEST_RUNNER = 'django.test.simple.run_tests' |
| 507 | +# The name of the class to use to run the test suite |
| 508 | +TEST_RUNNER = 'django.test.simple.DjangoTestSuiteRunner' |
383 | 509 |
|
384 | 510 | # The name of the database to use for testing purposes. |
385 | 511 | # If None, a name of 'test_' + DATABASE_NAME will be assumed |
|
0 commit comments