Fixed the admin_scripts tests to check for the right output with Python 2.4.
[django.git] / django / conf / global_settings.py
blob797841d297bd11837782579137e346bb0a84a0d8
1 # Default Django settings. Override these with settings in the module
2 # pointed-to by the DJANGO_SETTINGS_MODULE environment variable.
4 # This is defined here as a do-nothing function because we can't import
5 # django.utils.translation -- that module depends on the settings.
6 gettext_noop = lambda s: s
8 ####################
9 # CORE #
10 ####################
12 DEBUG = False
13 TEMPLATE_DEBUG = False
15 # Whether the framework should propagate raw exceptions rather than catching
16 # them. This is useful under some testing siutations and should never be used
17 # on a live site.
18 DEBUG_PROPAGATE_EXCEPTIONS = False
20 # Whether to use the "Etag" header. This saves bandwidth but slows down performance.
21 USE_ETAGS = False
23 # People who get code error notifications.
24 # In the format (('Full Name', 'email@domain.com'), ('Full Name', 'anotheremail@domain.com'))
25 ADMINS = ()
27 # Tuple of IP addresses, as strings, that:
28 # * See debug comments, when DEBUG is true
29 # * Receive x-headers
30 INTERNAL_IPS = ()
32 # Local time zone for this installation. All choices can be found here:
33 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name (although not all
34 # systems may support all possibilities).
35 TIME_ZONE = 'America/Chicago'
37 # Language code for this installation. All choices can be found here:
38 # http://www.i18nguy.com/unicode/language-identifiers.html
39 LANGUAGE_CODE = 'en-us'
41 # Languages we provide translations for, out of the box. The language name
42 # should be the utf-8 encoded local name for the language.
43 LANGUAGES = (
44 ('ar', gettext_noop('Arabic')),
45 ('bn', gettext_noop('Bengali')),
46 ('bg', gettext_noop('Bulgarian')),
47 ('ca', gettext_noop('Catalan')),
48 ('cs', gettext_noop('Czech')),
49 ('cy', gettext_noop('Welsh')),
50 ('da', gettext_noop('Danish')),
51 ('de', gettext_noop('German')),
52 ('el', gettext_noop('Greek')),
53 ('en', gettext_noop('English')),
54 ('es', gettext_noop('Spanish')),
55 ('et', gettext_noop('Estonian')),
56 ('es-ar', gettext_noop('Argentinean Spanish')),
57 ('eu', gettext_noop('Basque')),
58 ('fa', gettext_noop('Persian')),
59 ('fi', gettext_noop('Finnish')),
60 ('fr', gettext_noop('French')),
61 ('ga', gettext_noop('Irish')),
62 ('gl', gettext_noop('Galician')),
63 ('hu', gettext_noop('Hungarian')),
64 ('he', gettext_noop('Hebrew')),
65 ('hr', gettext_noop('Croatian')),
66 ('is', gettext_noop('Icelandic')),
67 ('it', gettext_noop('Italian')),
68 ('ja', gettext_noop('Japanese')),
69 ('ka', gettext_noop('Georgian')),
70 ('ko', gettext_noop('Korean')),
71 ('km', gettext_noop('Khmer')),
72 ('kn', gettext_noop('Kannada')),
73 ('lv', gettext_noop('Latvian')),
74 ('lt', gettext_noop('Lithuanian')),
75 ('mk', gettext_noop('Macedonian')),
76 ('nl', gettext_noop('Dutch')),
77 ('no', gettext_noop('Norwegian')),
78 ('pl', gettext_noop('Polish')),
79 ('pt', gettext_noop('Portugese')),
80 ('pt-br', gettext_noop('Brazilian Portuguese')),
81 ('ro', gettext_noop('Romanian')),
82 ('ru', gettext_noop('Russian')),
83 ('sk', gettext_noop('Slovak')),
84 ('sl', gettext_noop('Slovenian')),
85 ('sr', gettext_noop('Serbian')),
86 ('sv', gettext_noop('Swedish')),
87 ('ta', gettext_noop('Tamil')),
88 ('te', gettext_noop('Telugu')),
89 ('tr', gettext_noop('Turkish')),
90 ('uk', gettext_noop('Ukrainian')),
91 ('zh-cn', gettext_noop('Simplified Chinese')),
92 ('zh-tw', gettext_noop('Traditional Chinese')),
95 # Languages using BiDi (right-to-left) layout
96 LANGUAGES_BIDI = ("he", "ar", "fa")
98 # If you set this to False, Django will make some optimizations so as not
99 # to load the internationalization machinery.
100 USE_I18N = True
101 LOCALE_PATHS = ()
102 LANGUAGE_COOKIE_NAME = 'django_language'
104 # Not-necessarily-technical managers of the site. They get broken link
105 # notifications and other various e-mails.
106 MANAGERS = ADMINS
108 # Default content type and charset to use for all HttpResponse objects, if a
109 # MIME type isn't manually specified. These are used to construct the
110 # Content-Type header.
111 DEFAULT_CONTENT_TYPE = 'text/html'
112 DEFAULT_CHARSET = 'utf-8'
114 # Encoding of files read from disk (template and initial SQL files).
115 FILE_CHARSET = 'utf-8'
117 # E-mail address that error messages come from.
118 SERVER_EMAIL = 'root@localhost'
120 # Whether to send broken-link e-mails.
121 SEND_BROKEN_LINK_EMAILS = False
123 # Database connection info.
124 DATABASE_ENGINE = '' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
125 DATABASE_NAME = '' # Or path to database file if using sqlite3.
126 DATABASE_USER = '' # Not used with sqlite3.
127 DATABASE_PASSWORD = '' # Not used with sqlite3.
128 DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
129 DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
130 DATABASE_OPTIONS = {} # Set to empty dictionary for default.
132 # Host for sending e-mail.
133 EMAIL_HOST = 'localhost'
135 # Port for sending e-mail.
136 EMAIL_PORT = 25
138 # Optional SMTP authentication information for EMAIL_HOST.
139 EMAIL_HOST_USER = ''
140 EMAIL_HOST_PASSWORD = ''
141 EMAIL_USE_TLS = False
143 # List of strings representing installed apps.
144 INSTALLED_APPS = ()
146 # List of locations of the template source files, in search order.
147 TEMPLATE_DIRS = ()
149 # List of callables that know how to import templates from various sources.
150 # See the comments in django/core/template/loader.py for interface
151 # documentation.
152 TEMPLATE_LOADERS = (
153 'django.template.loaders.filesystem.load_template_source',
154 'django.template.loaders.app_directories.load_template_source',
155 # 'django.template.loaders.eggs.load_template_source',
158 # List of processors used by RequestContext to populate the context.
159 # Each one should be a callable that takes the request object as its
160 # only parameter and returns a dictionary to add to the context.
161 TEMPLATE_CONTEXT_PROCESSORS = (
162 'django.core.context_processors.auth',
163 'django.core.context_processors.debug',
164 'django.core.context_processors.i18n',
165 'django.core.context_processors.media',
166 # 'django.core.context_processors.request',
169 # Output to use in template system for invalid (e.g. misspelled) variables.
170 TEMPLATE_STRING_IF_INVALID = ''
172 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
173 # trailing slash.
174 # Examples: "http://foo.com/media/", "/media/".
175 ADMIN_MEDIA_PREFIX = '/media/'
177 # Default e-mail address to use for various automated correspondence from
178 # the site managers.
179 DEFAULT_FROM_EMAIL = 'webmaster@localhost'
181 # Subject-line prefix for email messages send with django.core.mail.mail_admins
182 # or ...mail_managers. Make sure to include the trailing space.
183 EMAIL_SUBJECT_PREFIX = '[Django] '
185 # Whether to append trailing slashes to URLs.
186 APPEND_SLASH = True
188 # Whether to prepend the "www." subdomain to URLs that don't have it.
189 PREPEND_WWW = False
191 # Override the server-derived value of SCRIPT_NAME
192 FORCE_SCRIPT_NAME = None
194 # List of compiled regular expression objects representing User-Agent strings
195 # that are not allowed to visit any page, systemwide. Use this for bad
196 # robots/crawlers. Here are a few examples:
197 # import re
198 # DISALLOWED_USER_AGENTS = (
199 # re.compile(r'^NaverBot.*'),
200 # re.compile(r'^EmailSiphon.*'),
201 # re.compile(r'^SiteSucker.*'),
202 # re.compile(r'^sohu-search')
204 DISALLOWED_USER_AGENTS = ()
206 ABSOLUTE_URL_OVERRIDES = {}
208 # Tuple of strings representing allowed prefixes for the {% ssi %} tag.
209 # Example: ('/home/html', '/var/www')
210 ALLOWED_INCLUDE_ROOTS = ()
212 # If this is a admin settings module, this should be a list of
213 # settings modules (in the format 'foo.bar.baz') for which this admin
214 # is an admin.
215 ADMIN_FOR = ()
217 # 404s that may be ignored.
218 IGNORABLE_404_STARTS = ('/cgi-bin/', '/_vti_bin', '/_vti_inf')
219 IGNORABLE_404_ENDS = ('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php')
221 # A secret key for this particular Django installation. Used in secret-key
222 # hashing algorithms. Set this in your settings, or Django will complain
223 # loudly.
224 SECRET_KEY = ''
226 # Path to the "jing" executable -- needed to validate XMLFields
227 JING_PATH = "/usr/bin/jing"
229 # Absolute path to the directory that holds media.
230 # Example: "/home/media/media.lawrence.com/"
231 MEDIA_ROOT = ''
233 # URL that handles the media served from MEDIA_ROOT.
234 # Example: "http://media.lawrence.com"
235 MEDIA_URL = ''
237 # List of upload handler classes to be applied in order.
238 FILE_UPLOAD_HANDLERS = (
239 'django.core.files.uploadhandler.MemoryFileUploadHandler',
240 'django.core.files.uploadhandler.TemporaryFileUploadHandler',
243 # Maximum size, in bytes, of a request before it will be streamed to the
244 # file system instead of into memory.
245 FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440 # i.e. 2.5 MB
247 # Directory in which upload streamed files will be temporarily saved. A value of
248 # `None` will make Django use the operating system's default temporary directory
249 # (i.e. "/tmp" on *nix systems).
250 FILE_UPLOAD_TEMP_DIR = None
252 # Default formatting for date objects. See all available format strings here:
253 # http://www.djangoproject.com/documentation/templates/#now
254 DATE_FORMAT = 'N j, Y'
256 # Default formatting for datetime objects. See all available format strings here:
257 # http://www.djangoproject.com/documentation/templates/#now
258 DATETIME_FORMAT = 'N j, Y, P'
260 # Default formatting for time objects. See all available format strings here:
261 # http://www.djangoproject.com/documentation/templates/#now
262 TIME_FORMAT = 'P'
264 # Default formatting for date objects when only the year and month are relevant.
265 # See all available format strings here:
266 # http://www.djangoproject.com/documentation/templates/#now
267 YEAR_MONTH_FORMAT = 'F Y'
269 # Default formatting for date objects when only the month and day are relevant.
270 # See all available format strings here:
271 # http://www.djangoproject.com/documentation/templates/#now
272 MONTH_DAY_FORMAT = 'F j'
274 # Do you want to manage transactions manually?
275 # Hint: you really don't!
276 TRANSACTIONS_MANAGED = False
278 # The User-Agent string to use when checking for URL validity through the
279 # isExistingURL validator.
280 from django import get_version
281 URL_VALIDATOR_USER_AGENT = "Django/%s (http://www.djangoproject.com)" % get_version()
283 # The tablespaces to use for each model when not specified otherwise.
284 DEFAULT_TABLESPACE = ''
285 DEFAULT_INDEX_TABLESPACE = ''
287 ##############
288 # MIDDLEWARE #
289 ##############
291 # List of middleware classes to use. Order is important; in the request phase,
292 # this middleware classes will be applied in the order given, and in the
293 # response phase the middleware will be applied in reverse order.
294 MIDDLEWARE_CLASSES = (
295 'django.contrib.sessions.middleware.SessionMiddleware',
296 'django.contrib.auth.middleware.AuthenticationMiddleware',
297 # 'django.middleware.http.ConditionalGetMiddleware',
298 # 'django.middleware.gzip.GZipMiddleware',
299 'django.middleware.common.CommonMiddleware',
300 'django.middleware.doc.XViewMiddleware',
303 ############
304 # SESSIONS #
305 ############
307 SESSION_COOKIE_NAME = 'sessionid' # Cookie name. This can be whatever you want.
308 SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2 # Age of cookie, in seconds (default: 2 weeks).
309 SESSION_COOKIE_DOMAIN = None # A string like ".lawrence.com", or None for standard domain cookie.
310 SESSION_COOKIE_SECURE = False # Whether the session cookie should be secure (https:// only).
311 SESSION_COOKIE_PATH = '/' # The path of the session cookie.
312 SESSION_SAVE_EVERY_REQUEST = False # Whether to save the session data on every request.
313 SESSION_EXPIRE_AT_BROWSER_CLOSE = False # Whether a user's session cookie expires when the Web browser is closed.
314 SESSION_ENGINE = 'django.contrib.sessions.backends.db' # The module to store session data
315 SESSION_FILE_PATH = None # Directory to store session files if using the file session module. If None, the backend will use a sensible default.
317 #########
318 # CACHE #
319 #########
321 # The cache backend to use. See the docstring in django.core.cache for the
322 # possible values.
323 CACHE_BACKEND = 'locmem://'
324 CACHE_MIDDLEWARE_KEY_PREFIX = ''
325 CACHE_MIDDLEWARE_SECONDS = 600
327 ####################
328 # COMMENTS #
329 ####################
331 COMMENTS_ALLOW_PROFANITIES = False
333 # The profanities that will trigger a validation error in the
334 # 'hasNoProfanities' validator. All of these should be in lowercase.
335 PROFANITIES_LIST = ('asshat', 'asshead', 'asshole', 'cunt', 'fuck', 'gook', 'nigger', 'shit')
337 # The group ID that designates which users are banned.
338 # Set to None if you're not using it.
339 COMMENTS_BANNED_USERS_GROUP = None
341 # The group ID that designates which users can moderate comments.
342 # Set to None if you're not using it.
343 COMMENTS_MODERATORS_GROUP = None
345 # The group ID that designates the users whose comments should be e-mailed to MANAGERS.
346 # Set to None if you're not using it.
347 COMMENTS_SKETCHY_USERS_GROUP = None
349 # The system will e-mail MANAGERS the first COMMENTS_FIRST_FEW comments by each
350 # user. Set this to 0 if you want to disable it.
351 COMMENTS_FIRST_FEW = 0
353 # A tuple of IP addresses that have been banned from participating in various
354 # Django-powered features.
355 BANNED_IPS = ()
357 ##################
358 # AUTHENTICATION #
359 ##################
361 AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend',)
363 LOGIN_URL = '/accounts/login/'
365 LOGOUT_URL = '/accounts/logout/'
367 LOGIN_REDIRECT_URL = '/accounts/profile/'
369 ###########
370 # TESTING #
371 ###########
373 # The name of the method to use to invoke the test suite
374 TEST_RUNNER = 'django.test.simple.run_tests'
376 # The name of the database to use for testing purposes.
377 # If None, a name of 'test_' + DATABASE_NAME will be assumed
378 TEST_DATABASE_NAME = None
380 # Strings used to set the character set and collation order for the test
381 # database. These values are passed literally to the server, so they are
382 # backend-dependent. If None, no special settings are sent (system defaults are
383 # used).
384 TEST_DATABASE_CHARSET = None
385 TEST_DATABASE_COLLATION = None
387 ############
388 # FIXTURES #
389 ############
391 # The list of directories to search for fixtures
392 FIXTURE_DIRS = ()