|
1 # Default Django settings. Override these with settings in the module |
|
2 # pointed-to by the DJANGO_SETTINGS_MODULE environment variable. |
|
3 |
|
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 |
|
7 |
|
8 #################### |
|
9 # CORE # |
|
10 #################### |
|
11 |
|
12 DEBUG = False |
|
13 TEMPLATE_DEBUG = False |
|
14 |
|
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 |
|
19 |
|
20 # Whether to use the "Etag" header. This saves bandwidth but slows down performance. |
|
21 USE_ETAGS = False |
|
22 |
|
23 # People who get code error notifications. |
|
24 # In the format (('Full Name', 'email@domain.com'), ('Full Name', 'anotheremail@domain.com')) |
|
25 ADMINS = () |
|
26 |
|
27 # Tuple of IP addresses, as strings, that: |
|
28 # * See debug comments, when DEBUG is true |
|
29 # * Receive x-headers |
|
30 INTERNAL_IPS = () |
|
31 |
|
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' |
|
36 |
|
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' |
|
40 |
|
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 ('hi', gettext_noop('Hindi')), |
|
66 ('hr', gettext_noop('Croatian')), |
|
67 ('is', gettext_noop('Icelandic')), |
|
68 ('it', gettext_noop('Italian')), |
|
69 ('ja', gettext_noop('Japanese')), |
|
70 ('ka', gettext_noop('Georgian')), |
|
71 ('ko', gettext_noop('Korean')), |
|
72 ('km', gettext_noop('Khmer')), |
|
73 ('kn', gettext_noop('Kannada')), |
|
74 ('lv', gettext_noop('Latvian')), |
|
75 ('lt', gettext_noop('Lithuanian')), |
|
76 ('mk', gettext_noop('Macedonian')), |
|
77 ('nl', gettext_noop('Dutch')), |
|
78 ('no', gettext_noop('Norwegian')), |
|
79 ('pl', gettext_noop('Polish')), |
|
80 ('pt', gettext_noop('Portuguese')), |
|
81 ('pt-br', gettext_noop('Brazilian Portuguese')), |
|
82 ('ro', gettext_noop('Romanian')), |
|
83 ('ru', gettext_noop('Russian')), |
|
84 ('sk', gettext_noop('Slovak')), |
|
85 ('sl', gettext_noop('Slovenian')), |
|
86 ('sr', gettext_noop('Serbian')), |
|
87 ('sv', gettext_noop('Swedish')), |
|
88 ('ta', gettext_noop('Tamil')), |
|
89 ('te', gettext_noop('Telugu')), |
|
90 ('th', gettext_noop('Thai')), |
|
91 ('tr', gettext_noop('Turkish')), |
|
92 ('uk', gettext_noop('Ukrainian')), |
|
93 ('zh-cn', gettext_noop('Simplified Chinese')), |
|
94 ('zh-tw', gettext_noop('Traditional Chinese')), |
|
95 ) |
|
96 |
|
97 # Languages using BiDi (right-to-left) layout |
|
98 LANGUAGES_BIDI = ("he", "ar", "fa") |
|
99 |
|
100 # If you set this to False, Django will make some optimizations so as not |
|
101 # to load the internationalization machinery. |
|
102 USE_I18N = True |
|
103 LOCALE_PATHS = () |
|
104 LANGUAGE_COOKIE_NAME = 'django_language' |
|
105 |
|
106 # Not-necessarily-technical managers of the site. They get broken link |
|
107 # notifications and other various e-mails. |
|
108 MANAGERS = ADMINS |
|
109 |
|
110 # Default content type and charset to use for all HttpResponse objects, if a |
|
111 # MIME type isn't manually specified. These are used to construct the |
|
112 # Content-Type header. |
|
113 DEFAULT_CONTENT_TYPE = 'text/html' |
|
114 DEFAULT_CHARSET = 'utf-8' |
|
115 |
|
116 # Encoding of files read from disk (template and initial SQL files). |
|
117 FILE_CHARSET = 'utf-8' |
|
118 |
|
119 # E-mail address that error messages come from. |
|
120 SERVER_EMAIL = 'root@localhost' |
|
121 |
|
122 # Whether to send broken-link e-mails. |
|
123 SEND_BROKEN_LINK_EMAILS = False |
|
124 |
|
125 # Database connection info. |
|
126 DATABASE_ENGINE = '' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
|
127 DATABASE_NAME = '' # Or path to database file if using sqlite3. |
|
128 DATABASE_USER = '' # Not used with sqlite3. |
|
129 DATABASE_PASSWORD = '' # Not used with sqlite3. |
|
130 DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. |
|
131 DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. |
|
132 DATABASE_OPTIONS = {} # Set to empty dictionary for default. |
|
133 |
|
134 # Host for sending e-mail. |
|
135 EMAIL_HOST = 'localhost' |
|
136 |
|
137 # Port for sending e-mail. |
|
138 EMAIL_PORT = 25 |
|
139 |
|
140 # Optional SMTP authentication information for EMAIL_HOST. |
|
141 EMAIL_HOST_USER = '' |
|
142 EMAIL_HOST_PASSWORD = '' |
|
143 EMAIL_USE_TLS = False |
|
144 |
|
145 # List of strings representing installed apps. |
|
146 INSTALLED_APPS = () |
|
147 |
|
148 # List of locations of the template source files, in search order. |
|
149 TEMPLATE_DIRS = () |
|
150 |
|
151 # List of callables that know how to import templates from various sources. |
|
152 # See the comments in django/core/template/loader.py for interface |
|
153 # documentation. |
|
154 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', |
|
158 ) |
|
159 |
|
160 # List of processors used by RequestContext to populate the context. |
|
161 # Each one should be a callable that takes the request object as its |
|
162 # only parameter and returns a dictionary to add to the context. |
|
163 TEMPLATE_CONTEXT_PROCESSORS = ( |
|
164 'django.core.context_processors.auth', |
|
165 'django.core.context_processors.debug', |
|
166 'django.core.context_processors.i18n', |
|
167 'django.core.context_processors.media', |
|
168 # 'django.core.context_processors.request', |
|
169 ) |
|
170 |
|
171 # Output to use in template system for invalid (e.g. misspelled) variables. |
|
172 TEMPLATE_STRING_IF_INVALID = '' |
|
173 |
|
174 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a |
|
175 # trailing slash. |
|
176 # Examples: "http://foo.com/media/", "/media/". |
|
177 ADMIN_MEDIA_PREFIX = '/media/' |
|
178 |
|
179 # Default e-mail address to use for various automated correspondence from |
|
180 # the site managers. |
|
181 DEFAULT_FROM_EMAIL = 'webmaster@localhost' |
|
182 |
|
183 # Subject-line prefix for email messages send with django.core.mail.mail_admins |
|
184 # or ...mail_managers. Make sure to include the trailing space. |
|
185 EMAIL_SUBJECT_PREFIX = '[Django] ' |
|
186 |
|
187 # Whether to append trailing slashes to URLs. |
|
188 APPEND_SLASH = True |
|
189 |
|
190 # Whether to prepend the "www." subdomain to URLs that don't have it. |
|
191 PREPEND_WWW = False |
|
192 |
|
193 # Override the server-derived value of SCRIPT_NAME |
|
194 FORCE_SCRIPT_NAME = None |
|
195 |
|
196 # List of compiled regular expression objects representing User-Agent strings |
|
197 # that are not allowed to visit any page, systemwide. Use this for bad |
|
198 # robots/crawlers. Here are a few examples: |
|
199 # import re |
|
200 # DISALLOWED_USER_AGENTS = ( |
|
201 # re.compile(r'^NaverBot.*'), |
|
202 # re.compile(r'^EmailSiphon.*'), |
|
203 # re.compile(r'^SiteSucker.*'), |
|
204 # re.compile(r'^sohu-search') |
|
205 # ) |
|
206 DISALLOWED_USER_AGENTS = () |
|
207 |
|
208 ABSOLUTE_URL_OVERRIDES = {} |
|
209 |
|
210 # Tuple of strings representing allowed prefixes for the {% ssi %} tag. |
|
211 # Example: ('/home/html', '/var/www') |
|
212 ALLOWED_INCLUDE_ROOTS = () |
|
213 |
|
214 # If this is a admin settings module, this should be a list of |
|
215 # settings modules (in the format 'foo.bar.baz') for which this admin |
|
216 # is an admin. |
|
217 ADMIN_FOR = () |
|
218 |
|
219 # 404s that may be ignored. |
|
220 IGNORABLE_404_STARTS = ('/cgi-bin/', '/_vti_bin', '/_vti_inf') |
|
221 IGNORABLE_404_ENDS = ('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php') |
|
222 |
|
223 # A secret key for this particular Django installation. Used in secret-key |
|
224 # hashing algorithms. Set this in your settings, or Django will complain |
|
225 # loudly. |
|
226 SECRET_KEY = '' |
|
227 |
|
228 # Default file storage mechanism that holds media. |
|
229 DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' |
|
230 |
|
231 # Absolute path to the directory that holds media. |
|
232 # Example: "/home/media/media.lawrence.com/" |
|
233 MEDIA_ROOT = '' |
|
234 |
|
235 # URL that handles the media served from MEDIA_ROOT. |
|
236 # Example: "http://media.lawrence.com" |
|
237 MEDIA_URL = '' |
|
238 |
|
239 # List of upload handler classes to be applied in order. |
|
240 FILE_UPLOAD_HANDLERS = ( |
|
241 'django.core.files.uploadhandler.MemoryFileUploadHandler', |
|
242 'django.core.files.uploadhandler.TemporaryFileUploadHandler', |
|
243 ) |
|
244 |
|
245 # Maximum size, in bytes, of a request before it will be streamed to the |
|
246 # file system instead of into memory. |
|
247 FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440 # i.e. 2.5 MB |
|
248 |
|
249 # Directory in which upload streamed files will be temporarily saved. A value of |
|
250 # `None` will make Django use the operating system's default temporary directory |
|
251 # (i.e. "/tmp" on *nix systems). |
|
252 FILE_UPLOAD_TEMP_DIR = None |
|
253 |
|
254 # The numeric mode to set newly-uploaded files to. The value should be a mode |
|
255 # you'd pass directly to os.chmod; see http://docs.python.org/lib/os-file-dir.html. |
|
256 FILE_UPLOAD_PERMISSIONS = None |
|
257 |
|
258 # Default formatting for date objects. See all available format strings here: |
|
259 # http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now |
|
260 DATE_FORMAT = 'N j, Y' |
|
261 |
|
262 # Default formatting for datetime objects. See all available format strings here: |
|
263 # http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now |
|
264 DATETIME_FORMAT = 'N j, Y, P' |
|
265 |
|
266 # Default formatting for time objects. See all available format strings here: |
|
267 # http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now |
|
268 TIME_FORMAT = 'P' |
|
269 |
|
270 # Default formatting for date objects when only the year and month are relevant. |
|
271 # See all available format strings here: |
|
272 # http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now |
|
273 YEAR_MONTH_FORMAT = 'F Y' |
|
274 |
|
275 # Default formatting for date objects when only the month and day are relevant. |
|
276 # See all available format strings here: |
|
277 # http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now |
|
278 MONTH_DAY_FORMAT = 'F j' |
|
279 |
|
280 # Do you want to manage transactions manually? |
|
281 # Hint: you really don't! |
|
282 TRANSACTIONS_MANAGED = False |
|
283 |
|
284 # The User-Agent string to use when checking for URL validity through the |
|
285 # isExistingURL validator. |
|
286 from django import get_version |
|
287 URL_VALIDATOR_USER_AGENT = "Django/%s (http://www.djangoproject.com)" % get_version() |
|
288 |
|
289 # The tablespaces to use for each model when not specified otherwise. |
|
290 DEFAULT_TABLESPACE = '' |
|
291 DEFAULT_INDEX_TABLESPACE = '' |
|
292 |
|
293 ############## |
|
294 # MIDDLEWARE # |
|
295 ############## |
|
296 |
|
297 # List of middleware classes to use. Order is important; in the request phase, |
|
298 # this middleware classes will be applied in the order given, and in the |
|
299 # response phase the middleware will be applied in reverse order. |
|
300 MIDDLEWARE_CLASSES = ( |
|
301 'django.middleware.common.CommonMiddleware', |
|
302 'django.contrib.sessions.middleware.SessionMiddleware', |
|
303 'django.contrib.auth.middleware.AuthenticationMiddleware', |
|
304 # 'django.middleware.http.ConditionalGetMiddleware', |
|
305 # 'django.middleware.gzip.GZipMiddleware', |
|
306 ) |
|
307 |
|
308 ############ |
|
309 # SESSIONS # |
|
310 ############ |
|
311 |
|
312 SESSION_COOKIE_NAME = 'sessionid' # Cookie name. This can be whatever you want. |
|
313 SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2 # Age of cookie, in seconds (default: 2 weeks). |
|
314 SESSION_COOKIE_DOMAIN = None # A string like ".lawrence.com", or None for standard domain cookie. |
|
315 SESSION_COOKIE_SECURE = False # Whether the session cookie should be secure (https:// only). |
|
316 SESSION_COOKIE_PATH = '/' # The path of the session cookie. |
|
317 SESSION_SAVE_EVERY_REQUEST = False # Whether to save the session data on every request. |
|
318 SESSION_EXPIRE_AT_BROWSER_CLOSE = False # Whether a user's session cookie expires when the Web browser is closed. |
|
319 SESSION_ENGINE = 'django.contrib.sessions.backends.db' # The module to store session data |
|
320 SESSION_FILE_PATH = None # Directory to store session files if using the file session module. If None, the backend will use a sensible default. |
|
321 |
|
322 ######### |
|
323 # CACHE # |
|
324 ######### |
|
325 |
|
326 # The cache backend to use. See the docstring in django.core.cache for the |
|
327 # possible values. |
|
328 CACHE_BACKEND = 'locmem://' |
|
329 CACHE_MIDDLEWARE_KEY_PREFIX = '' |
|
330 CACHE_MIDDLEWARE_SECONDS = 600 |
|
331 |
|
332 #################### |
|
333 # COMMENTS # |
|
334 #################### |
|
335 |
|
336 COMMENTS_ALLOW_PROFANITIES = False |
|
337 |
|
338 # The profanities that will trigger a validation error in the |
|
339 # 'hasNoProfanities' validator. All of these should be in lowercase. |
|
340 PROFANITIES_LIST = ('asshat', 'asshead', 'asshole', 'cunt', 'fuck', 'gook', 'nigger', 'shit') |
|
341 |
|
342 # The group ID that designates which users are banned. |
|
343 # Set to None if you're not using it. |
|
344 COMMENTS_BANNED_USERS_GROUP = None |
|
345 |
|
346 # The group ID that designates which users can moderate comments. |
|
347 # Set to None if you're not using it. |
|
348 COMMENTS_MODERATORS_GROUP = None |
|
349 |
|
350 # The group ID that designates the users whose comments should be e-mailed to MANAGERS. |
|
351 # Set to None if you're not using it. |
|
352 COMMENTS_SKETCHY_USERS_GROUP = None |
|
353 |
|
354 # The system will e-mail MANAGERS the first COMMENTS_FIRST_FEW comments by each |
|
355 # user. Set this to 0 if you want to disable it. |
|
356 COMMENTS_FIRST_FEW = 0 |
|
357 |
|
358 # A tuple of IP addresses that have been banned from participating in various |
|
359 # Django-powered features. |
|
360 BANNED_IPS = () |
|
361 |
|
362 ################## |
|
363 # AUTHENTICATION # |
|
364 ################## |
|
365 |
|
366 AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend',) |
|
367 |
|
368 LOGIN_URL = '/accounts/login/' |
|
369 |
|
370 LOGOUT_URL = '/accounts/logout/' |
|
371 |
|
372 LOGIN_REDIRECT_URL = '/accounts/profile/' |
|
373 |
|
374 # The number of days a password reset link is valid for |
|
375 PASSWORD_RESET_TIMEOUT_DAYS = 3 |
|
376 |
|
377 ########### |
|
378 # TESTING # |
|
379 ########### |
|
380 |
|
381 # The name of the method to use to invoke the test suite |
|
382 TEST_RUNNER = 'django.test.simple.run_tests' |
|
383 |
|
384 # The name of the database to use for testing purposes. |
|
385 # If None, a name of 'test_' + DATABASE_NAME will be assumed |
|
386 TEST_DATABASE_NAME = None |
|
387 |
|
388 # Strings used to set the character set and collation order for the test |
|
389 # database. These values are passed literally to the server, so they are |
|
390 # backend-dependent. If None, no special settings are sent (system defaults are |
|
391 # used). |
|
392 TEST_DATABASE_CHARSET = None |
|
393 TEST_DATABASE_COLLATION = None |
|
394 |
|
395 ############ |
|
396 # FIXTURES # |
|
397 ############ |
|
398 |
|
399 # The list of directories to search for fixtures |
|
400 FIXTURE_DIRS = () |