2005-07-13 09:25:57 +08:00
|
|
|
# Default Django settings. Override these with settings in the module
|
|
|
|
# pointed-to by the DJANGO_SETTINGS_MODULE environment variable.
|
|
|
|
|
2006-07-04 11:58:45 +08:00
|
|
|
# This is defined here as a do-nothing function because we can't import
|
|
|
|
# django.utils.translation -- that module depends on the settings.
|
|
|
|
gettext_noop = lambda s: s
|
2005-11-04 12:59:46 +08:00
|
|
|
|
2005-07-13 09:25:57 +08:00
|
|
|
####################
|
|
|
|
# CORE #
|
|
|
|
####################
|
|
|
|
|
|
|
|
DEBUG = False
|
2005-11-24 07:10:17 +08:00
|
|
|
TEMPLATE_DEBUG = False
|
2008-06-12 11:37:13 +08:00
|
|
|
|
|
|
|
# Whether the framework should propagate raw exceptions rather than catching
|
2011-08-12 22:14:15 +08:00
|
|
|
# them. This is useful under some testing situations and should never be used
|
2008-06-12 11:37:13 +08:00
|
|
|
# on a live site.
|
2008-05-17 07:24:36 +08:00
|
|
|
DEBUG_PROPAGATE_EXCEPTIONS = False
|
2005-07-13 09:25:57 +08:00
|
|
|
|
|
|
|
# Whether to use the "Etag" header. This saves bandwidth but slows down performance.
|
|
|
|
USE_ETAGS = False
|
|
|
|
|
2005-07-14 12:03:11 +08:00
|
|
|
# People who get code error notifications.
|
2010-11-03 00:19:17 +08:00
|
|
|
# In the format (('Full Name', 'email@example.com'), ('Full Name', 'anotheremail@example.com'))
|
2005-07-14 12:03:11 +08:00
|
|
|
ADMINS = ()
|
2005-07-13 09:25:57 +08:00
|
|
|
|
2005-07-14 12:27:55 +08:00
|
|
|
# Tuple of IP addresses, as strings, that:
|
2005-07-13 09:25:57 +08:00
|
|
|
# * See debug comments, when DEBUG is true
|
|
|
|
# * Receive x-headers
|
2005-07-14 12:27:55 +08:00
|
|
|
INTERNAL_IPS = ()
|
2005-07-13 09:25:57 +08:00
|
|
|
|
2013-02-10 01:17:01 +08:00
|
|
|
# Hosts/domain names that are valid for this site.
|
|
|
|
# "*" matches anything, ".example.com" matches example.com and all subdomains
|
|
|
|
ALLOWED_HOSTS = []
|
|
|
|
|
2005-07-13 09:25:57 +08:00
|
|
|
# Local time zone for this installation. All choices can be found here:
|
2007-08-19 18:24:35 +08:00
|
|
|
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name (although not all
|
2011-11-18 21:01:06 +08:00
|
|
|
# systems may support all possibilities). When USE_TZ is True, this is
|
|
|
|
# interpreted as the default user time zone.
|
2005-07-13 09:25:57 +08:00
|
|
|
TIME_ZONE = 'America/Chicago'
|
2012-10-28 19:33:38 +08:00
|
|
|
|
2011-11-18 21:01:06 +08:00
|
|
|
# If you set this to True, Django will use timezone-aware datetimes.
|
|
|
|
USE_TZ = False
|
|
|
|
|
2005-07-13 09:25:57 +08:00
|
|
|
# Language code for this installation. All choices can be found here:
|
2007-10-22 00:20:02 +08:00
|
|
|
# http://www.i18nguy.com/unicode/language-identifiers.html
|
2005-07-13 09:25:57 +08:00
|
|
|
LANGUAGE_CODE = 'en-us'
|
|
|
|
|
2013-01-10 02:55:58 +08:00
|
|
|
# Languages we provide translations for, out of the box.
|
2005-11-04 12:59:46 +08:00
|
|
|
LANGUAGES = (
|
2013-02-26 05:47:41 +08:00
|
|
|
('af', gettext_noop('Afrikaans')),
|
2006-07-10 22:14:00 +08:00
|
|
|
('ar', gettext_noop('Arabic')),
|
2011-03-01 16:50:18 +08:00
|
|
|
('az', gettext_noop('Azerbaijani')),
|
2007-05-14 16:12:03 +08:00
|
|
|
('bg', gettext_noop('Bulgarian')),
|
2013-02-26 05:47:41 +08:00
|
|
|
('be', gettext_noop('Belarusian')),
|
2010-01-28 10:00:08 +08:00
|
|
|
('bn', gettext_noop('Bengali')),
|
2013-02-26 05:47:41 +08:00
|
|
|
('br', gettext_noop('Breton')),
|
2010-03-02 23:42:32 +08:00
|
|
|
('bs', gettext_noop('Bosnian')),
|
2007-02-15 08:07:07 +08:00
|
|
|
('ca', gettext_noop('Catalan')),
|
2006-07-04 11:58:45 +08:00
|
|
|
('cs', gettext_noop('Czech')),
|
|
|
|
('cy', gettext_noop('Welsh')),
|
|
|
|
('da', gettext_noop('Danish')),
|
|
|
|
('de', gettext_noop('German')),
|
|
|
|
('el', gettext_noop('Greek')),
|
|
|
|
('en', gettext_noop('English')),
|
2013-09-19 20:07:59 +08:00
|
|
|
('en-au', gettext_noop('Australian English')),
|
2010-04-29 22:38:50 +08:00
|
|
|
('en-gb', gettext_noop('British English')),
|
2012-03-14 17:12:43 +08:00
|
|
|
('eo', gettext_noop('Esperanto')),
|
2006-07-04 11:58:45 +08:00
|
|
|
('es', gettext_noop('Spanish')),
|
2010-08-06 10:10:45 +08:00
|
|
|
('es-ar', gettext_noop('Argentinian Spanish')),
|
2011-02-06 14:06:29 +08:00
|
|
|
('es-mx', gettext_noop('Mexican Spanish')),
|
2011-03-16 06:13:24 +08:00
|
|
|
('es-ni', gettext_noop('Nicaraguan Spanish')),
|
2013-02-26 05:47:41 +08:00
|
|
|
('es-ve', gettext_noop('Venezuelan Spanish')),
|
2010-01-28 10:00:08 +08:00
|
|
|
('et', gettext_noop('Estonian')),
|
2008-02-15 19:29:27 +08:00
|
|
|
('eu', gettext_noop('Basque')),
|
2007-06-24 20:16:06 +08:00
|
|
|
('fa', gettext_noop('Persian')),
|
2006-09-11 22:53:36 +08:00
|
|
|
('fi', gettext_noop('Finnish')),
|
2006-07-04 11:58:45 +08:00
|
|
|
('fr', gettext_noop('French')),
|
2013-11-11 16:05:17 +08:00
|
|
|
('fy', gettext_noop('Frisian')),
|
2008-02-19 11:40:24 +08:00
|
|
|
('ga', gettext_noop('Irish')),
|
2006-07-04 11:58:45 +08:00
|
|
|
('gl', gettext_noop('Galician')),
|
|
|
|
('he', gettext_noop('Hebrew')),
|
2008-11-14 15:11:34 +08:00
|
|
|
('hi', gettext_noop('Hindi')),
|
2007-08-13 09:17:19 +08:00
|
|
|
('hr', gettext_noop('Croatian')),
|
2010-01-28 10:00:08 +08:00
|
|
|
('hu', gettext_noop('Hungarian')),
|
2013-02-26 05:47:41 +08:00
|
|
|
('ia', gettext_noop('Interlingua')),
|
2010-05-10 02:54:22 +08:00
|
|
|
('id', gettext_noop('Indonesian')),
|
2006-07-04 11:58:45 +08:00
|
|
|
('is', gettext_noop('Icelandic')),
|
|
|
|
('it', gettext_noop('Italian')),
|
|
|
|
('ja', gettext_noop('Japanese')),
|
2008-02-19 11:38:16 +08:00
|
|
|
('ka', gettext_noop('Georgian')),
|
2012-03-14 17:13:24 +08:00
|
|
|
('kk', gettext_noop('Kazakh')),
|
2007-09-14 03:51:26 +08:00
|
|
|
('km', gettext_noop('Khmer')),
|
2007-02-26 16:23:33 +08:00
|
|
|
('kn', gettext_noop('Kannada')),
|
2010-01-28 10:00:08 +08:00
|
|
|
('ko', gettext_noop('Korean')),
|
2013-02-26 05:47:41 +08:00
|
|
|
('lb', gettext_noop('Luxembourgish')),
|
2008-06-19 04:53:55 +08:00
|
|
|
('lt', gettext_noop('Lithuanian')),
|
2010-01-28 10:00:08 +08:00
|
|
|
('lv', gettext_noop('Latvian')),
|
2007-02-15 07:56:29 +08:00
|
|
|
('mk', gettext_noop('Macedonian')),
|
2010-08-06 10:10:21 +08:00
|
|
|
('ml', gettext_noop('Malayalam')),
|
2010-05-04 19:10:36 +08:00
|
|
|
('mn', gettext_noop('Mongolian')),
|
2013-03-28 17:01:30 +08:00
|
|
|
('my', gettext_noop('Burmese')),
|
2010-04-29 22:36:09 +08:00
|
|
|
('nb', gettext_noop('Norwegian Bokmal')),
|
2012-03-14 17:14:07 +08:00
|
|
|
('ne', gettext_noop('Nepali')),
|
|
|
|
('nl', gettext_noop('Dutch')),
|
2010-04-29 22:35:25 +08:00
|
|
|
('nn', gettext_noop('Norwegian Nynorsk')),
|
2013-03-28 16:54:16 +08:00
|
|
|
('os', gettext_noop('Ossetic')),
|
2010-10-18 19:23:07 +08:00
|
|
|
('pa', gettext_noop('Punjabi')),
|
2006-10-17 00:23:28 +08:00
|
|
|
('pl', gettext_noop('Polish')),
|
2008-10-24 12:37:51 +08:00
|
|
|
('pt', gettext_noop('Portuguese')),
|
2008-04-05 10:50:01 +08:00
|
|
|
('pt-br', gettext_noop('Brazilian Portuguese')),
|
2006-07-04 11:58:45 +08:00
|
|
|
('ro', gettext_noop('Romanian')),
|
|
|
|
('ru', gettext_noop('Russian')),
|
|
|
|
('sk', gettext_noop('Slovak')),
|
|
|
|
('sl', gettext_noop('Slovenian')),
|
2010-01-28 22:17:15 +08:00
|
|
|
('sq', gettext_noop('Albanian')),
|
2006-07-04 11:58:45 +08:00
|
|
|
('sr', gettext_noop('Serbian')),
|
2010-01-02 05:38:11 +08:00
|
|
|
('sr-latn', gettext_noop('Serbian Latin')),
|
2006-07-04 11:58:45 +08:00
|
|
|
('sv', gettext_noop('Swedish')),
|
2012-03-14 17:14:48 +08:00
|
|
|
('sw', gettext_noop('Swahili')),
|
2006-07-21 22:47:14 +08:00
|
|
|
('ta', gettext_noop('Tamil')),
|
2007-03-09 12:42:30 +08:00
|
|
|
('te', gettext_noop('Telugu')),
|
2008-11-10 18:24:51 +08:00
|
|
|
('th', gettext_noop('Thai')),
|
2006-09-25 21:30:16 +08:00
|
|
|
('tr', gettext_noop('Turkish')),
|
2012-03-14 17:15:31 +08:00
|
|
|
('tt', gettext_noop('Tatar')),
|
2013-02-26 05:47:41 +08:00
|
|
|
('udm', gettext_noop('Udmurt')),
|
2006-07-04 11:58:45 +08:00
|
|
|
('uk', gettext_noop('Ukrainian')),
|
2011-03-01 16:50:18 +08:00
|
|
|
('ur', gettext_noop('Urdu')),
|
2010-02-22 07:41:37 +08:00
|
|
|
('vi', gettext_noop('Vietnamese')),
|
2006-07-04 11:58:45 +08:00
|
|
|
('zh-cn', gettext_noop('Simplified Chinese')),
|
2013-11-05 01:31:34 +08:00
|
|
|
('zh-hans', gettext_noop('Simplified Chinese')),
|
|
|
|
('zh-hant', gettext_noop('Traditional Chinese')),
|
2006-07-04 11:58:45 +08:00
|
|
|
('zh-tw', gettext_noop('Traditional Chinese')),
|
2005-11-04 12:59:46 +08:00
|
|
|
)
|
|
|
|
|
2006-05-16 15:35:20 +08:00
|
|
|
# Languages using BiDi (right-to-left) layout
|
2013-05-19 16:29:24 +08:00
|
|
|
LANGUAGES_BIDI = ("he", "ar", "fa", "ur")
|
2006-05-16 15:35:20 +08:00
|
|
|
|
2006-07-01 11:09:14 +08:00
|
|
|
# If you set this to False, Django will make some optimizations so as not
|
|
|
|
# to load the internationalization machinery.
|
|
|
|
USE_I18N = True
|
2007-11-19 13:59:58 +08:00
|
|
|
LOCALE_PATHS = ()
|
2008-03-01 02:38:44 +08:00
|
|
|
LANGUAGE_COOKIE_NAME = 'django_language'
|
2007-11-19 13:59:58 +08:00
|
|
|
|
2009-12-23 01:58:49 +08:00
|
|
|
# If you set this to True, Django will format dates, numbers and calendars
|
2011-11-18 21:01:06 +08:00
|
|
|
# according to user current locale.
|
2009-12-23 01:58:49 +08:00
|
|
|
USE_L10N = False
|
|
|
|
|
2005-07-13 09:25:57 +08:00
|
|
|
# Not-necessarily-technical managers of the site. They get broken link
|
2011-04-02 00:10:22 +08:00
|
|
|
# notifications and other various emails.
|
2005-07-13 09:25:57 +08:00
|
|
|
MANAGERS = ADMINS
|
|
|
|
|
2005-10-06 10:27:08 +08:00
|
|
|
# Default content type and charset to use for all HttpResponse objects, if a
|
|
|
|
# MIME type isn't manually specified. These are used to construct the
|
|
|
|
# Content-Type header.
|
|
|
|
DEFAULT_CONTENT_TYPE = 'text/html'
|
|
|
|
DEFAULT_CHARSET = 'utf-8'
|
2005-09-23 09:50:01 +08:00
|
|
|
|
Merged Unicode branch into trunk (r4952:5608). This should be fully
backwards compatible for all practical purposes.
Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04 20:11:04 +08:00
|
|
|
# Encoding of files read from disk (template and initial SQL files).
|
|
|
|
FILE_CHARSET = 'utf-8'
|
|
|
|
|
2012-09-26 20:14:51 +08:00
|
|
|
# Email address that error messages come from.
|
2005-07-14 12:27:55 +08:00
|
|
|
SERVER_EMAIL = 'root@localhost'
|
2005-07-13 09:25:57 +08:00
|
|
|
|
2013-01-02 05:28:48 +08:00
|
|
|
# Whether to send broken-link emails. Deprecated, must be removed in 1.8.
|
2005-08-02 04:01:18 +08:00
|
|
|
SEND_BROKEN_LINK_EMAILS = False
|
2005-07-13 09:25:57 +08:00
|
|
|
|
2012-10-29 06:02:41 +08:00
|
|
|
# Database connection info. If left empty, will default to the dummy backend.
|
|
|
|
DATABASES = {}
|
2009-12-22 23:18:51 +08:00
|
|
|
|
2011-12-18 01:37:24 +08:00
|
|
|
# Classes used to implement DB routing behavior.
|
2010-01-22 22:30:06 +08:00
|
|
|
DATABASE_ROUTERS = []
|
|
|
|
|
2009-11-03 20:53:26 +08:00
|
|
|
# The email backend to use. For possible shortcuts see django.core.mail.
|
|
|
|
# The default is to use the SMTP backend.
|
|
|
|
# Third-party backends can be specified by providing a Python path
|
|
|
|
# to a module that defines an EmailBackend class.
|
2010-01-04 20:05:04 +08:00
|
|
|
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
2009-11-03 20:53:26 +08:00
|
|
|
|
2011-04-02 00:10:22 +08:00
|
|
|
# Host for sending email.
|
2005-07-13 09:25:57 +08:00
|
|
|
EMAIL_HOST = 'localhost'
|
|
|
|
|
2011-04-02 00:10:22 +08:00
|
|
|
# Port for sending email.
|
2006-04-11 11:23:03 +08:00
|
|
|
EMAIL_PORT = 25
|
|
|
|
|
2006-03-23 03:47:15 +08:00
|
|
|
# Optional SMTP authentication information for EMAIL_HOST.
|
|
|
|
EMAIL_HOST_USER = ''
|
|
|
|
EMAIL_HOST_PASSWORD = ''
|
2007-05-03 21:35:02 +08:00
|
|
|
EMAIL_USE_TLS = False
|
2013-07-12 02:58:06 +08:00
|
|
|
EMAIL_USE_SSL = False
|
2006-03-23 03:47:15 +08:00
|
|
|
|
2005-11-12 06:56:18 +08:00
|
|
|
# List of strings representing installed apps.
|
|
|
|
INSTALLED_APPS = ()
|
|
|
|
|
2005-07-14 12:27:55 +08:00
|
|
|
# List of locations of the template source files, in search order.
|
|
|
|
TEMPLATE_DIRS = ()
|
2005-07-13 09:25:57 +08:00
|
|
|
|
2005-10-15 06:22:12 +08:00
|
|
|
# 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 = (
|
2009-12-14 20:08:23 +08:00
|
|
|
'django.template.loaders.filesystem.Loader',
|
|
|
|
'django.template.loaders.app_directories.Loader',
|
2013-10-18 06:27:45 +08:00
|
|
|
# 'django.template.loaders.eggs.Loader',
|
2005-10-15 06:22:12 +08:00
|
|
|
)
|
|
|
|
|
2006-05-02 09:31:56 +08:00
|
|
|
# List of processors used by RequestContext to populate the context.
|
2005-12-24 12:39:59 +08:00
|
|
|
# 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 = (
|
2010-02-22 07:40:47 +08:00
|
|
|
'django.contrib.auth.context_processors.auth',
|
2005-12-24 12:39:59 +08:00
|
|
|
'django.core.context_processors.debug',
|
|
|
|
'django.core.context_processors.i18n',
|
2010-11-12 05:44:33 +08:00
|
|
|
'django.core.context_processors.media',
|
2010-11-17 23:36:26 +08:00
|
|
|
'django.core.context_processors.static',
|
2011-11-18 21:01:06 +08:00
|
|
|
'django.core.context_processors.tz',
|
2013-10-18 06:27:45 +08:00
|
|
|
# 'django.core.context_processors.request',
|
2009-12-10 00:57:23 +08:00
|
|
|
'django.contrib.messages.context_processors.messages',
|
2005-12-24 12:39:59 +08:00
|
|
|
)
|
|
|
|
|
2006-02-09 08:31:51 +08:00
|
|
|
# Output to use in template system for invalid (e.g. misspelled) variables.
|
|
|
|
TEMPLATE_STRING_IF_INVALID = ''
|
|
|
|
|
2011-04-02 00:10:22 +08:00
|
|
|
# Default email address to use for various automated correspondence from
|
2005-07-14 12:27:55 +08:00
|
|
|
# the site managers.
|
|
|
|
DEFAULT_FROM_EMAIL = 'webmaster@localhost'
|
2005-07-13 09:25:57 +08:00
|
|
|
|
2005-09-28 00:32:21 +08:00
|
|
|
# Subject-line prefix for email messages send with django.core.mail.mail_admins
|
|
|
|
# or ...mail_managers. Make sure to include the trailing space.
|
|
|
|
EMAIL_SUBJECT_PREFIX = '[Django] '
|
|
|
|
|
2005-07-14 12:27:55 +08:00
|
|
|
# Whether to append trailing slashes to URLs.
|
2005-07-13 09:25:57 +08:00
|
|
|
APPEND_SLASH = True
|
|
|
|
|
2005-07-14 12:27:55 +08:00
|
|
|
# Whether to prepend the "www." subdomain to URLs that don't have it.
|
2005-07-13 09:25:57 +08:00
|
|
|
PREPEND_WWW = False
|
|
|
|
|
2008-07-21 15:57:10 +08:00
|
|
|
# Override the server-derived value of SCRIPT_NAME
|
|
|
|
FORCE_SCRIPT_NAME = None
|
|
|
|
|
2005-07-14 12:27:55 +08:00
|
|
|
# List of compiled regular expression objects representing User-Agent strings
|
|
|
|
# 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 = (
|
|
|
|
# re.compile(r'^NaverBot.*'),
|
|
|
|
# re.compile(r'^EmailSiphon.*'),
|
|
|
|
# re.compile(r'^SiteSucker.*'),
|
|
|
|
# re.compile(r'^sohu-search')
|
|
|
|
# )
|
|
|
|
DISALLOWED_USER_AGENTS = ()
|
2005-07-13 09:25:57 +08:00
|
|
|
|
|
|
|
ABSOLUTE_URL_OVERRIDES = {}
|
|
|
|
|
2005-07-14 12:27:55 +08:00
|
|
|
# Tuple of strings representing allowed prefixes for the {% ssi %} tag.
|
|
|
|
# Example: ('/home/html', '/var/www')
|
|
|
|
ALLOWED_INCLUDE_ROOTS = ()
|
2005-07-13 09:25:57 +08:00
|
|
|
|
2005-07-14 12:27:55 +08:00
|
|
|
# If this is a admin settings module, this should be a list of
|
|
|
|
# settings modules (in the format 'foo.bar.baz') for which this admin
|
|
|
|
# is an admin.
|
2005-10-17 12:36:51 +08:00
|
|
|
ADMIN_FOR = ()
|
2005-07-13 09:25:57 +08:00
|
|
|
|
2011-05-06 04:49:26 +08:00
|
|
|
# List of compiled regular expression objects representing URLs that need not
|
2013-01-02 05:28:48 +08:00
|
|
|
# be reported by BrokenLinkEmailsMiddleware. Here are a few examples:
|
2011-05-06 04:49:26 +08:00
|
|
|
# import re
|
|
|
|
# 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 = ()
|
2005-07-13 09:25:57 +08:00
|
|
|
|
2005-07-20 08:37:45 +08:00
|
|
|
# A secret key for this particular Django installation. Used in secret-key
|
|
|
|
# hashing algorithms. Set this in your settings, or Django will complain
|
|
|
|
# loudly.
|
|
|
|
SECRET_KEY = ''
|
|
|
|
|
2008-08-09 04:59:02 +08:00
|
|
|
# Default file storage mechanism that holds media.
|
|
|
|
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
|
|
|
|
|
2010-11-17 07:48:08 +08:00
|
|
|
# Absolute filesystem path to the directory that will hold user-uploaded files.
|
2012-06-07 17:50:20 +08:00
|
|
|
# Example: "/var/www/example.com/media/"
|
2005-11-07 07:16:24 +08:00
|
|
|
MEDIA_ROOT = ''
|
|
|
|
|
|
|
|
# URL that handles the media served from MEDIA_ROOT.
|
2012-06-07 17:50:20 +08:00
|
|
|
# Examples: "http://example.com/media/", "http://media.example.com/"
|
2005-11-07 07:16:24 +08:00
|
|
|
MEDIA_URL = ''
|
|
|
|
|
2012-06-07 17:50:20 +08:00
|
|
|
# Absolute path to the directory static files should be collected to.
|
|
|
|
# Example: "/var/www/example.com/static/"
|
2013-12-10 01:29:39 +08:00
|
|
|
STATIC_ROOT = None
|
2010-11-17 23:36:26 +08:00
|
|
|
|
|
|
|
# URL that handles the static files served from STATIC_ROOT.
|
2012-06-07 17:50:20 +08:00
|
|
|
# Example: "http://example.com/static/", "http://static.example.com/"
|
2010-11-17 23:36:26 +08:00
|
|
|
STATIC_URL = None
|
|
|
|
|
2008-07-01 23:10:51 +08:00
|
|
|
# List of upload handler classes to be applied in order.
|
|
|
|
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.
|
2013-11-03 05:02:56 +08:00
|
|
|
FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440 # i.e. 2.5 MB
|
2008-07-01 23:10:51 +08:00
|
|
|
|
|
|
|
# Directory in which upload streamed files will be temporarily saved. A value of
|
|
|
|
# `None` will make Django use the operating system's default temporary directory
|
|
|
|
# (i.e. "/tmp" on *nix systems).
|
|
|
|
FILE_UPLOAD_TEMP_DIR = None
|
|
|
|
|
2008-08-28 06:21:14 +08:00
|
|
|
# The numeric mode to set newly-uploaded files to. The value should be a mode
|
|
|
|
# you'd pass directly to os.chmod; see http://docs.python.org/lib/os-file-dir.html.
|
|
|
|
FILE_UPLOAD_PERMISSIONS = None
|
|
|
|
|
2013-05-13 19:38:53 +08:00
|
|
|
# The numeric mode to assign to newly-created directories, when uploading files.
|
|
|
|
# The value should be a mode as you'd pass to os.chmod;
|
|
|
|
# see http://docs.python.org/lib/os-file-dir.html.
|
|
|
|
FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
|
|
|
|
|
2009-12-23 01:58:49 +08:00
|
|
|
# Python module path where user will place custom format definition.
|
|
|
|
# The directory where this setting is pointing should contain subdirectories
|
|
|
|
# named as the locales, containing a formats.py file
|
|
|
|
# (i.e. "myproject.locale" for myproject/locale/en/formats.py etc. use)
|
|
|
|
FORMAT_MODULE_PATH = None
|
|
|
|
|
2005-11-07 07:49:03 +08:00
|
|
|
# Default formatting for date objects. See all available format strings here:
|
2010-10-09 02:26:12 +08:00
|
|
|
# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
2005-11-07 07:49:03 +08:00
|
|
|
DATE_FORMAT = 'N j, Y'
|
|
|
|
|
|
|
|
# Default formatting for datetime objects. See all available format strings here:
|
2010-10-09 02:26:12 +08:00
|
|
|
# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
2005-11-07 07:49:03 +08:00
|
|
|
DATETIME_FORMAT = 'N j, Y, P'
|
|
|
|
|
|
|
|
# Default formatting for time objects. See all available format strings here:
|
2010-10-09 02:26:12 +08:00
|
|
|
# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
2005-11-07 07:49:03 +08:00
|
|
|
TIME_FORMAT = 'P'
|
|
|
|
|
2006-06-02 12:20:32 +08:00
|
|
|
# Default formatting for date objects when only the year and month are relevant.
|
|
|
|
# See all available format strings here:
|
2010-10-09 02:26:12 +08:00
|
|
|
# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
2006-06-02 12:20:32 +08:00
|
|
|
YEAR_MONTH_FORMAT = 'F Y'
|
|
|
|
|
|
|
|
# Default formatting for date objects when only the month and day are relevant.
|
|
|
|
# See all available format strings here:
|
2010-10-09 02:26:12 +08:00
|
|
|
# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
2006-06-02 12:20:32 +08:00
|
|
|
MONTH_DAY_FORMAT = 'F j'
|
|
|
|
|
2010-02-16 20:12:53 +08:00
|
|
|
# Default short formatting for date objects. See all available format strings here:
|
2010-10-09 02:26:12 +08:00
|
|
|
# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
2009-12-23 01:58:49 +08:00
|
|
|
SHORT_DATE_FORMAT = 'm/d/Y'
|
|
|
|
|
|
|
|
# Default short formatting for datetime objects.
|
|
|
|
# See all available format strings here:
|
2010-10-09 02:26:12 +08:00
|
|
|
# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
|
2009-12-23 01:58:49 +08:00
|
|
|
SHORT_DATETIME_FORMAT = 'm/d/Y P'
|
|
|
|
|
|
|
|
# Default formats to be used when parsing dates from input boxes, in order
|
|
|
|
# See all available format string here:
|
|
|
|
# http://docs.python.org/library/datetime.html#strftime-behavior
|
|
|
|
# * Note that these format strings are different from the ones to display dates
|
|
|
|
DATE_INPUT_FORMATS = (
|
2013-11-03 05:02:56 +08:00
|
|
|
'%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'
|
2009-12-23 01:58:49 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# Default formats to be used when parsing times from input boxes, in order
|
|
|
|
# See all available format string here:
|
|
|
|
# http://docs.python.org/library/datetime.html#strftime-behavior
|
|
|
|
# * Note that these format strings are different from the ones to display dates
|
|
|
|
TIME_INPUT_FORMATS = (
|
|
|
|
'%H:%M:%S', # '14:30:59'
|
2013-03-03 01:01:24 +08:00
|
|
|
'%H:%M:%S.%f', # '14:30:59.000200'
|
2009-12-23 01:58:49 +08:00
|
|
|
'%H:%M', # '14:30'
|
|
|
|
)
|
|
|
|
|
|
|
|
# Default formats to be used when parsing dates and times from input boxes,
|
|
|
|
# in order
|
|
|
|
# See all available format string here:
|
|
|
|
# http://docs.python.org/library/datetime.html#strftime-behavior
|
|
|
|
# * Note that these format strings are different from the ones to display dates
|
|
|
|
DATETIME_INPUT_FORMATS = (
|
|
|
|
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
|
2011-06-10 01:03:45 +08:00
|
|
|
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
|
2009-12-23 01:58:49 +08:00
|
|
|
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
|
|
|
|
'%Y-%m-%d', # '2006-10-25'
|
|
|
|
'%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59'
|
2011-06-10 01:03:45 +08:00
|
|
|
'%m/%d/%Y %H:%M:%S.%f', # '10/25/2006 14:30:59.000200'
|
2009-12-23 01:58:49 +08:00
|
|
|
'%m/%d/%Y %H:%M', # '10/25/2006 14:30'
|
|
|
|
'%m/%d/%Y', # '10/25/2006'
|
|
|
|
'%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59'
|
2011-06-10 01:03:45 +08:00
|
|
|
'%m/%d/%y %H:%M:%S.%f', # '10/25/06 14:30:59.000200'
|
2009-12-23 01:58:49 +08:00
|
|
|
'%m/%d/%y %H:%M', # '10/25/06 14:30'
|
|
|
|
'%m/%d/%y', # '10/25/06'
|
|
|
|
)
|
|
|
|
|
|
|
|
# First day of week, to be used on calendars
|
|
|
|
# 0 means Sunday, 1 means Monday...
|
|
|
|
FIRST_DAY_OF_WEEK = 0
|
|
|
|
|
|
|
|
# Decimal separator symbol
|
|
|
|
DECIMAL_SEPARATOR = '.'
|
|
|
|
|
|
|
|
# Boolean that sets whether to add thousand separator when formatting numbers
|
|
|
|
USE_THOUSAND_SEPARATOR = False
|
|
|
|
|
2011-08-12 22:14:15 +08:00
|
|
|
# Number of digits that will be together, when splitting them by
|
2010-09-13 03:40:44 +08:00
|
|
|
# THOUSAND_SEPARATOR. 0 means no grouping, 3 means splitting by thousands...
|
2009-12-23 01:58:49 +08:00
|
|
|
NUMBER_GROUPING = 0
|
|
|
|
|
|
|
|
# Thousand separator symbol
|
|
|
|
THOUSAND_SEPARATOR = ','
|
|
|
|
|
2006-05-02 09:31:56 +08:00
|
|
|
# Do you want to manage transactions manually?
|
|
|
|
# Hint: you really don't!
|
|
|
|
TRANSACTIONS_MANAGED = False
|
|
|
|
|
2007-12-02 03:23:49 +08:00
|
|
|
# The tablespaces to use for each model when not specified otherwise.
|
|
|
|
DEFAULT_TABLESPACE = ''
|
|
|
|
DEFAULT_INDEX_TABLESPACE = ''
|
|
|
|
|
2011-05-31 06:27:47 +08:00
|
|
|
# Default X-Frame-Options header value
|
|
|
|
X_FRAME_OPTIONS = 'SAMEORIGIN'
|
|
|
|
|
2011-09-10 08:46:38 +08:00
|
|
|
USE_X_FORWARDED_HOST = False
|
|
|
|
|
2011-10-22 12:30:10 +08:00
|
|
|
# The Python dotted path to the WSGI application that Django's internal servers
|
|
|
|
# (runserver, runfcgi) will use. If `None`, the return value of
|
|
|
|
# 'django.core.wsgi.get_wsgi_application' is used, thus preserving the same
|
|
|
|
# behavior as previous versions of Django. Otherwise this should point to an
|
|
|
|
# actual WSGI application object.
|
|
|
|
WSGI_APPLICATION = None
|
|
|
|
|
2011-12-17 06:06:06 +08:00
|
|
|
# If your Django app is behind a proxy that sets a header to specify secure
|
|
|
|
# connections, AND that proxy ensures that user-submitted headers with the
|
|
|
|
# same name are ignored (so that people can't spoof it), set this value to
|
|
|
|
# a tuple of (header_name, header_value). For any requests that come in with
|
|
|
|
# that header/value, request.is_secure() will return True.
|
|
|
|
# WARNING! Only set this if you fully understand what you're doing. Otherwise,
|
|
|
|
# you may be opening yourself up to a security risk.
|
|
|
|
SECURE_PROXY_SSL_HEADER = None
|
|
|
|
|
2005-07-13 09:25:57 +08:00
|
|
|
##############
|
2005-07-14 12:27:55 +08:00
|
|
|
# MIDDLEWARE #
|
2005-07-13 09:25:57 +08:00
|
|
|
##############
|
|
|
|
|
|
|
|
# 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 = (
|
2009-03-24 07:20:40 +08:00
|
|
|
'django.middleware.common.CommonMiddleware',
|
2006-05-26 12:05:02 +08:00
|
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
2009-10-27 08:36:34 +08:00
|
|
|
'django.middleware.csrf.CsrfViewMiddleware',
|
2006-05-26 12:05:02 +08:00
|
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
2009-12-10 00:57:23 +08:00
|
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
2013-10-18 06:27:45 +08:00
|
|
|
# 'django.middleware.http.ConditionalGetMiddleware',
|
|
|
|
# 'django.middleware.gzip.GZipMiddleware',
|
2005-07-13 09:25:57 +08:00
|
|
|
)
|
|
|
|
|
2005-08-17 06:54:05 +08:00
|
|
|
############
|
|
|
|
# SESSIONS #
|
|
|
|
############
|
|
|
|
|
2012-10-31 04:59:23 +08:00
|
|
|
SESSION_CACHE_ALIAS = 'default' # Cache to store session data if using the cache session backend.
|
2007-09-16 05:29:14 +08:00
|
|
|
SESSION_COOKIE_NAME = 'sessionid' # Cookie name. This can be whatever you want.
|
|
|
|
SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2 # Age of cookie, in seconds (default: 2 weeks).
|
2012-06-07 17:50:20 +08:00
|
|
|
SESSION_COOKIE_DOMAIN = None # A string like ".example.com", or None for standard domain cookie.
|
2007-09-16 05:29:14 +08:00
|
|
|
SESSION_COOKIE_SECURE = False # Whether the session cookie should be secure (https:// only).
|
2007-10-20 13:13:56 +08:00
|
|
|
SESSION_COOKIE_PATH = '/' # The path of the session cookie.
|
2011-11-22 06:03:03 +08:00
|
|
|
SESSION_COOKIE_HTTPONLY = True # Whether to use the non-RFC standard httpOnly flag (IE, FF3+, others)
|
2007-09-16 05:29:14 +08:00
|
|
|
SESSION_SAVE_EVERY_REQUEST = False # Whether to save the session data on every request.
|
2008-06-12 11:37:13 +08:00
|
|
|
SESSION_EXPIRE_AT_BROWSER_CLOSE = False # Whether a user's session cookie expires when the Web browser is closed.
|
2007-09-16 05:29:14 +08:00
|
|
|
SESSION_ENGINE = 'django.contrib.sessions.backends.db' # The module to store session data
|
2008-03-25 12:42:21 +08:00
|
|
|
SESSION_FILE_PATH = None # Directory to store session files if using the file session module. If None, the backend will use a sensible default.
|
2013-08-22 08:12:19 +08:00
|
|
|
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer' # class to serialize session data
|
2005-08-17 06:54:05 +08:00
|
|
|
|
2005-07-13 09:25:57 +08:00
|
|
|
#########
|
|
|
|
# CACHE #
|
|
|
|
#########
|
|
|
|
|
2012-04-30 02:45:55 +08:00
|
|
|
# The cache backends to use.
|
2010-12-21 23:19:19 +08:00
|
|
|
CACHES = {
|
2012-04-30 02:45:55 +08:00
|
|
|
'default': {
|
|
|
|
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
|
|
|
|
}
|
2010-12-21 23:19:19 +08:00
|
|
|
}
|
2005-10-09 09:02:19 +08:00
|
|
|
CACHE_MIDDLEWARE_KEY_PREFIX = ''
|
2007-07-05 19:08:40 +08:00
|
|
|
CACHE_MIDDLEWARE_SECONDS = 600
|
2010-12-21 23:19:19 +08:00
|
|
|
CACHE_MIDDLEWARE_ALIAS = 'default'
|
2005-07-13 09:25:57 +08:00
|
|
|
|
|
|
|
####################
|
|
|
|
# COMMENTS #
|
|
|
|
####################
|
|
|
|
|
|
|
|
COMMENTS_ALLOW_PROFANITIES = False
|
|
|
|
|
2011-10-07 16:35:20 +08:00
|
|
|
# The profanities that will trigger a validation error in
|
|
|
|
# CommentDetailsForm.clean_comment. All of these should be in lowercase.
|
2010-10-07 23:13:00 +08:00
|
|
|
PROFANITIES_LIST = ()
|
2006-09-22 10:48:19 +08:00
|
|
|
|
2006-06-29 00:37:02 +08:00
|
|
|
##################
|
|
|
|
# AUTHENTICATION #
|
|
|
|
##################
|
|
|
|
|
Fixed #3011 -- Added swappable auth.User models.
Thanks to the many people that contributed to the development and review of
this patch, including (but not limited to) Jacob Kaplan-Moss, Anssi
Kääriäinen, Ramiro Morales, Preston Holmes, Josh Ourisman, Thomas Sutton,
and Roger Barnes, as well as the many, many people who have contributed to
the design discussion around this ticket over many years.
Squashed commit of the following:
commit d84749a0f034a0a6906d20df047086b1219040d0
Merge: 531e771 7c11b1a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Wed Sep 26 18:37:04 2012 +0800
Merge remote-tracking branch 'django/master' into t3011
commit 531e7715da545f930c49919a19e954d41c59b446
Merge: 29d1abb 1f84b04
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Wed Sep 26 07:09:23 2012 +0800
Merged recent trunk changes.
commit 29d1abbe351fd5da855fe5ce09e24227d90ddc91
Merge: 8a527dd 54c81a1
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Mon Sep 24 07:49:46 2012 +0800
Merge remote-tracking branch 'django/master' into t3011
commit 8a527dda13c9bec955b1f7e8db5822d1d9b32a01
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Mon Sep 24 07:48:05 2012 +0800
Ensure sequences are reset correctly in the presence of swapped models.
commit e2b6e22f298eb986d74d28b8d9906f37f5ff8eb8
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 23 17:53:05 2012 +0800
Modifications to the handling and docs for auth forms.
commit 98aba856b534620aea9091f824b442b47d2fdb3c
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 23 15:28:57 2012 +0800
Improved error handling and docs for get_user_model()
commit 0229209c844f06dfeb33b0b8eeec000c127695b6
Merge: 6494bf9 8599f64
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 23 14:50:11 2012 +0800
Merged recent Django trunk changes.
commit 6494bf91f2ddaaabec3ec017f2e3131937c35517
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Mon Sep 17 21:38:44 2012 +0800
Improved validation of swappable model settings.
commit 5a04cde342cc860384eb844cfda5af55204564ad
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Mon Sep 17 07:15:14 2012 +0800
Removed some unused imports.
commit ffd535e4136dc54f084b6ac467e81444696e1c8a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 20:31:28 2012 +0800
Corrected attribute access on for get_by_natural_key
commit 913e1ac84c3d9c7c58a9b3bdbbb15ebccd8a8c0a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 20:12:34 2012 +0800
Added test for proxy model safeguards on swappable models.
commit 280bf19e94d0d534d0e51bae485c1842558f4ff4
Merge: dbb3900 935a863
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 18:16:49 2012 +0800
Merge remote-tracking branch 'django/master' into t3011
commit dbb3900775a99df8b6cb1d7063cf364eab55621a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 18:09:27 2012 +0800
Fixes for Python 3 compatibility.
commit dfd72131d8664615e245aa0f95b82604ba6b3821
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 15:54:30 2012 +0800
Added protection against proxying swapped models.
commit abcb027190e53613e7f1734e77ee185b2587de31
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 15:11:10 2012 +0800
Cleanup and documentation of AbstractUser base class.
commit a9491a87763e307f0eb0dc246f54ac865a6ffb34
Merge: fd8bb4e 08bcb4a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 14:46:49 2012 +0800
Merge commit '08bcb4aec1ed154cefc631b8510ee13e9af0c19d' into t3011
commit fd8bb4e3e498a92d7a8b340f0684d5f088aa4c92
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 14:20:14 2012 +0800
Documentation improvements coming from community review.
commit b550a6d06d016ab6a0198c4cb2dffe9cceabe8a5
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 13:52:47 2012 +0800
Refactored skipIfCustomUser into the contrib.auth tests.
commit 52a02f11107c3f0d711742b8ca65b75175b79d6a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 13:46:10 2012 +0800
Refactored common 'get' pattern into manager method.
commit b441a6bbc7d6065175715cb09316b9f13268171b
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 13:41:33 2012 +0800
Added note about backwards incompatible change to admin login messages.
commit 08bcb4aec1ed154cefc631b8510ee13e9af0c19d
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date: Sat Sep 15 18:30:33 2012 +0300
Splitted User to AbstractUser and User
commit d9f5e5addbad5e1a01f67e7358e4f5091c3cad81
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date: Sat Sep 15 18:30:02 2012 +0300
Reworked REQUIRED_FIELDS + create_user() interaction
commit 579f152e4a6e06671e1ac1e59e2b43cf4d764bf4
Merge: 9184972 93e6733
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sat Sep 15 20:18:37 2012 +0800
Merge remote-tracking branch 'django/master' into t3011
commit 918497218c58227f5032873ff97261627b2ceab2
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sat Sep 15 20:18:19 2012 +0800
Deprecate AUTH_PROFILE_MODULE and get_profile().
commit 334cdfc1bb6a6794791497cdefda843bca2ea57a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sat Sep 15 20:00:12 2012 +0800
Added release notes for new swappable User feature.
commit 5d7bb22e8d913b51aba1c3360e7af8b01b6c0ab6
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sat Sep 15 19:59:49 2012 +0800
Ensure swapped models can't be queried.
commit 57ac6e3d32605a67581e875b37ec5b2284711a32
Merge: f2ec915 abfba3b
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sat Sep 15 14:31:54 2012 +0800
Merge remote-tracking branch 'django/master' into t3011
commit f2ec915b20f81c8afeaa3df25f80689712f720f8
Merge: 1952656 5e99a3d
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 9 08:29:51 2012 +0800
Merge remote-tracking branch 'django/master' into t3011
commit 19526563b54fa300785c49cfb625c0c6158ced67
Merge: 2c5e833 c4aa26a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 9 08:22:26 2012 +0800
Merge recent changes from master.
commit 2c5e833a30bef4305d55eacc0703533152f5c427
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 9 07:53:46 2012 +0800
Corrected admin_views tests following removal of the email fallback on admin logins.
commit 20d1892491839d6ef21f37db4ca136935c2076bf
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 9 01:00:37 2012 +0800
Added conditional skips for all tests dependent on the default User model
commit 40ea8b888284775481fc1eaadeff267dbd7e3dfa
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sat Sep 8 23:47:02 2012 +0800
Added documentation for REQUIRED_FIELDS in custom auth.
commit e6aaf659708cf6491f5485d3edfa616cb9214cc0
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sat Sep 8 23:20:02 2012 +0800
Added first draft of custom User docs.
Thanks to Greg Turner for the initial text.
commit 75118bd242eec87649da2859e8c50a199a8a1dca
Author: Thomas Sutton <me@thomas-sutton.id.au>
Date: Mon Aug 20 11:17:26 2012 +0800
Admin app should not allow username discovery
The admin app login form should not allow users to discover the username
associated with an email address.
commit d088b3af58dad7449fc58493193a327725c57c22
Author: Thomas Sutton <me@thomas-sutton.id.au>
Date: Mon Aug 20 10:32:13 2012 +0800
Admin app login form should use swapped user model
commit 7e82e83d67ee0871a72e1a3a723afdd214fcefc3
Merge: e29c010 39aa890
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Fri Sep 7 23:45:03 2012 +0800
Merged master changes.
commit e29c010beb96ca07697c4e3e0c0d5d3ffdc4c0a3
Merge: 8e3fd70 30bdf22
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Mon Aug 20 13:12:57 2012 +0800
Merge remote-tracking branch 'django/master' into t3011
commit 8e3fd703d02c31a4c3ac9f51f5011d03c0bd47f6
Merge: 507bb50 26e0ba0
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Mon Aug 20 13:09:09 2012 +0800
Merged recent changes from trunk.
commit 507bb50a9291bfcdcfa1198f9fea21d4e3b1e762
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Mon Jun 4 20:41:37 2012 +0800
Modified auth app so that login with alternate auth app is possible.
commit dabe3628362ab7a4a6c9686dd874803baa997eaa
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Mon Jun 4 20:10:51 2012 +0800
Modified auth management commands to handle custom user definitions.
commit 7cc0baf89d490c92ef3f1dc909b8090191a1294b
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Mon Jun 4 14:17:28 2012 +0800
Added model Meta option for swappable models, and made auth.User a swappable model
2012-09-26 18:48:09 +08:00
|
|
|
AUTH_USER_MODEL = 'auth.User'
|
|
|
|
|
2006-06-29 00:37:02 +08:00
|
|
|
AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend',)
|
2006-08-27 20:46:39 +08:00
|
|
|
|
2007-04-25 16:49:57 +08:00
|
|
|
LOGIN_URL = '/accounts/login/'
|
|
|
|
|
|
|
|
LOGOUT_URL = '/accounts/logout/'
|
|
|
|
|
|
|
|
LOGIN_REDIRECT_URL = '/accounts/profile/'
|
|
|
|
|
2008-08-01 04:47:53 +08:00
|
|
|
# The number of days a password reset link is valid for
|
|
|
|
PASSWORD_RESET_TIMEOUT_DAYS = 3
|
|
|
|
|
2011-12-23 11:46:06 +08:00
|
|
|
# the first hasher in this list is the preferred algorithm. any
|
|
|
|
# password using different algorithms will be converted automatically
|
|
|
|
# upon login
|
|
|
|
PASSWORD_HASHERS = (
|
|
|
|
'django.contrib.auth.hashers.PBKDF2PasswordHasher',
|
|
|
|
'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
|
2013-03-26 23:44:26 +08:00
|
|
|
'django.contrib.auth.hashers.BCryptSHA256PasswordHasher',
|
2011-12-23 11:46:06 +08:00
|
|
|
'django.contrib.auth.hashers.BCryptPasswordHasher',
|
|
|
|
'django.contrib.auth.hashers.SHA1PasswordHasher',
|
|
|
|
'django.contrib.auth.hashers.MD5PasswordHasher',
|
2013-02-26 03:01:57 +08:00
|
|
|
'django.contrib.auth.hashers.UnsaltedSHA1PasswordHasher',
|
2012-03-01 04:12:16 +08:00
|
|
|
'django.contrib.auth.hashers.UnsaltedMD5PasswordHasher',
|
2011-12-23 11:46:06 +08:00
|
|
|
'django.contrib.auth.hashers.CryptPasswordHasher',
|
|
|
|
)
|
|
|
|
|
2011-05-21 22:41:14 +08:00
|
|
|
###########
|
|
|
|
# SIGNING #
|
|
|
|
###########
|
|
|
|
|
|
|
|
SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
|
|
|
|
|
Fixed #9977 - CsrfMiddleware gets template tag added, session dependency removed, and turned on by default.
This is a large change to CSRF protection for Django. It includes:
* removing the dependency on the session framework.
* deprecating CsrfResponseMiddleware, and replacing with a core template tag.
* turning on CSRF protection by default by adding CsrfViewMiddleware to
the default value of MIDDLEWARE_CLASSES.
* protecting all contrib apps (whatever is in settings.py)
using a decorator.
For existing users of the CSRF functionality, it should be a seamless update,
but please note that it includes DEPRECATION of features in Django 1.1,
and there are upgrade steps which are detailed in the docs.
Many thanks to 'Glenn' and 'bthomas', who did a lot of the thinking and work
on the patch, and to lots of other people including Simon Willison and
Russell Keith-Magee who refined the ideas.
Details of the rationale for these changes is found here:
http://code.djangoproject.com/wiki/CsrfProtection
As of this commit, the CSRF code is mainly in 'contrib'. The code will be
moved to core in a separate commit, to make the changeset as readable as
possible.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-27 07:23:07 +08:00
|
|
|
########
|
|
|
|
# CSRF #
|
|
|
|
########
|
|
|
|
|
|
|
|
# Dotted path to callable to be used as view when a request is
|
|
|
|
# rejected by the CSRF middleware.
|
2009-10-27 08:36:34 +08:00
|
|
|
CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
|
Fixed #9977 - CsrfMiddleware gets template tag added, session dependency removed, and turned on by default.
This is a large change to CSRF protection for Django. It includes:
* removing the dependency on the session framework.
* deprecating CsrfResponseMiddleware, and replacing with a core template tag.
* turning on CSRF protection by default by adding CsrfViewMiddleware to
the default value of MIDDLEWARE_CLASSES.
* protecting all contrib apps (whatever is in settings.py)
using a decorator.
For existing users of the CSRF functionality, it should be a seamless update,
but please note that it includes DEPRECATION of features in Django 1.1,
and there are upgrade steps which are detailed in the docs.
Many thanks to 'Glenn' and 'bthomas', who did a lot of the thinking and work
on the patch, and to lots of other people including Simon Willison and
Russell Keith-Magee who refined the ideas.
Details of the rationale for these changes is found here:
http://code.djangoproject.com/wiki/CsrfProtection
As of this commit, the CSRF code is mainly in 'contrib'. The code will be
moved to core in a separate commit, to make the changeset as readable as
possible.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-27 07:23:07 +08:00
|
|
|
|
2011-05-10 07:00:22 +08:00
|
|
|
# Settings for CSRF cookie.
|
Fixed #9977 - CsrfMiddleware gets template tag added, session dependency removed, and turned on by default.
This is a large change to CSRF protection for Django. It includes:
* removing the dependency on the session framework.
* deprecating CsrfResponseMiddleware, and replacing with a core template tag.
* turning on CSRF protection by default by adding CsrfViewMiddleware to
the default value of MIDDLEWARE_CLASSES.
* protecting all contrib apps (whatever is in settings.py)
using a decorator.
For existing users of the CSRF functionality, it should be a seamless update,
but please note that it includes DEPRECATION of features in Django 1.1,
and there are upgrade steps which are detailed in the docs.
Many thanks to 'Glenn' and 'bthomas', who did a lot of the thinking and work
on the patch, and to lots of other people including Simon Willison and
Russell Keith-Magee who refined the ideas.
Details of the rationale for these changes is found here:
http://code.djangoproject.com/wiki/CsrfProtection
As of this commit, the CSRF code is mainly in 'contrib'. The code will be
moved to core in a separate commit, to make the changeset as readable as
possible.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-27 07:23:07 +08:00
|
|
|
CSRF_COOKIE_NAME = 'csrftoken'
|
|
|
|
CSRF_COOKIE_DOMAIN = None
|
2011-05-10 07:00:22 +08:00
|
|
|
CSRF_COOKIE_PATH = '/'
|
|
|
|
CSRF_COOKIE_SECURE = False
|
2013-02-07 16:48:08 +08:00
|
|
|
CSRF_COOKIE_HTTPONLY = False
|
Fixed #9977 - CsrfMiddleware gets template tag added, session dependency removed, and turned on by default.
This is a large change to CSRF protection for Django. It includes:
* removing the dependency on the session framework.
* deprecating CsrfResponseMiddleware, and replacing with a core template tag.
* turning on CSRF protection by default by adding CsrfViewMiddleware to
the default value of MIDDLEWARE_CLASSES.
* protecting all contrib apps (whatever is in settings.py)
using a decorator.
For existing users of the CSRF functionality, it should be a seamless update,
but please note that it includes DEPRECATION of features in Django 1.1,
and there are upgrade steps which are detailed in the docs.
Many thanks to 'Glenn' and 'bthomas', who did a lot of the thinking and work
on the patch, and to lots of other people including Simon Willison and
Russell Keith-Magee who refined the ideas.
Details of the rationale for these changes is found here:
http://code.djangoproject.com/wiki/CsrfProtection
As of this commit, the CSRF code is mainly in 'contrib'. The code will be
moved to core in a separate commit, to make the changeset as readable as
possible.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-27 07:23:07 +08:00
|
|
|
|
2009-12-10 00:57:23 +08:00
|
|
|
############
|
|
|
|
# MESSAGES #
|
|
|
|
############
|
|
|
|
|
2011-08-12 22:14:15 +08:00
|
|
|
# Class to use as messages backend
|
2011-04-02 16:36:04 +08:00
|
|
|
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
|
2009-12-10 00:57:23 +08:00
|
|
|
|
|
|
|
# Default values of MESSAGE_LEVEL and MESSAGE_TAGS are defined within
|
|
|
|
# django.contrib.messages to avoid imports in this settings file.
|
|
|
|
|
2010-10-04 23:12:39 +08:00
|
|
|
###########
|
|
|
|
# LOGGING #
|
|
|
|
###########
|
|
|
|
|
|
|
|
# The callable to use to configure logging
|
2013-07-02 04:50:58 +08:00
|
|
|
LOGGING_CONFIG = 'logging.config.dictConfig'
|
2010-10-04 23:12:39 +08:00
|
|
|
|
2012-09-25 04:30:38 +08:00
|
|
|
# Custom logging configuration.
|
|
|
|
LOGGING = {}
|
2010-10-04 23:12:39 +08:00
|
|
|
|
2011-06-09 06:18:46 +08:00
|
|
|
# Default exception reporter filter class used in case none has been
|
|
|
|
# specifically assigned to the HttpRequest instance.
|
|
|
|
DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
|
|
|
|
|
2006-08-27 20:46:39 +08:00
|
|
|
###########
|
|
|
|
# TESTING #
|
|
|
|
###########
|
|
|
|
|
2010-01-18 23:11:01 +08:00
|
|
|
# The name of the class to use to run the test suite
|
2013-05-11 11:08:45 +08:00
|
|
|
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
|
2006-09-01 21:33:26 +08:00
|
|
|
|
2007-03-01 21:11:08 +08:00
|
|
|
############
|
|
|
|
# FIXTURES #
|
|
|
|
############
|
|
|
|
|
|
|
|
# The list of directories to search for fixtures
|
|
|
|
FIXTURE_DIRS = ()
|
2010-10-20 09:33:24 +08:00
|
|
|
|
|
|
|
###############
|
|
|
|
# STATICFILES #
|
|
|
|
###############
|
|
|
|
|
|
|
|
# A list of locations of additional static files
|
|
|
|
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 = (
|
|
|
|
'django.contrib.staticfiles.finders.FileSystemFinder',
|
|
|
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
2013-10-18 06:27:45 +08:00
|
|
|
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
|
2010-10-20 09:33:24 +08:00
|
|
|
)
|
2013-06-19 22:36:02 +08:00
|
|
|
|
|
|
|
##############
|
|
|
|
# MIGRATIONS #
|
|
|
|
##############
|
|
|
|
|
|
|
|
# Migration module overrides for apps, by app label.
|
|
|
|
MIGRATION_MODULES = {}
|
2014-01-20 10:45:21 +08:00
|
|
|
|
|
|
|
#################
|
|
|
|
# SYSTEM CHECKS #
|
|
|
|
#################
|
|
|
|
|
|
|
|
# List of all issues generated by system checks that should be silenced. Light
|
|
|
|
# issues like warnings, infos or debugs will not generate a message. Silencing
|
|
|
|
# serious issues like errors and criticals does not result in hiding the
|
|
|
|
# message, but Django will not stop you from e.g. running server.
|
|
|
|
SILENCED_SYSTEM_CHECKS = []
|