Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 1293 lines (1121 sloc) 39.248 kb
4255cad Jannis Leidel Use new version of Vagrant's configuration system.
jezdez authored
1 # Django settings for kuma project.
cf71cac luke crouch bug 1113260 - use sys.maxint for throttle limit
groovecoder authored
2 from collections import namedtuple
3 import json
e6f8ac3 Getting basic settings in place
James Socol authored
4 import logging
a814221 Erik Rose [bug 610527] Implement very tolerant fetching and storing of WebTrends s...
erikrose authored
5 import os
6 import platform
cf71cac luke crouch bug 1113260 - use sys.maxint for throttle limit
groovecoder authored
7 import sys
e3f86da django skeleton
James Socol authored
8
a7cfcfd luke crouch bug 634402 bug 634263 move mdn apps into kuma; functional but mis-styled
groovecoder authored
9 from django.utils.functional import lazy
d7dc4c8 luke crouch bug 634402 mdn settings to fix mdn tests
groovecoder authored
10 from django.utils.translation import ugettext_lazy as _
421162d Jannis Leidel Use reverse for the login related URL settings.
jezdez authored
11 from django.core.urlresolvers import reverse_lazy
a7cfcfd luke crouch bug 634402 bug 634263 move mdn apps into kuma; functional but mis-styled
groovecoder authored
12
c6183e1 Jannis Leidel Bug 756533 - Move the LOCALES setting population inline.
jezdez authored
13 _Language = namedtuple(u'Language', u'english native iso639_1')
14
d03b6f8 Adding middleware and tests. Removing dependency on django-localeurl. Ad...
James Socol authored
15
bae688d luke crouch bug 674557 use unminified jquery.gmap to avoid minification errors
groovecoder authored
16 DEBUG = False
e3f86da django skeleton
James Socol authored
17 TEMPLATE_DEBUG = DEBUG
148035f Push celery logs to syslog when DEBUG=False.
James Socol authored
18
e6f8ac3 Getting basic settings in place
James Socol authored
19 ROOT = os.path.dirname(os.path.abspath(__file__))
20 path = lambda *a: os.path.join(ROOT, *a)
e3f86da django skeleton
James Socol authored
21
06167d9 Creating locale submodule, and tweaking some settings so it works.
James Socol authored
22 ROOT_PACKAGE = os.path.basename(ROOT)
23
e3f86da django skeleton
James Socol authored
24 ADMINS = (
be01cdc Jannis Leidel Added search index admin to be able to easier handle search index change...
jezdez authored
25 ('MDN devs', 'mdn-dev@mozilla.com'),
e3f86da django skeleton
James Socol authored
26 )
27
ad38a43 David Walsh fix bug 771714 - Set absolute avatar URL
darkwing authored
28 PROTOCOL = 'https://'
29 DOMAIN = 'developer.mozilla.org'
561dc92 David Walsh Add production URL for sphinx templates
darkwing authored
30 SITE_URL = PROTOCOL + DOMAIN
31 PRODUCTION_URL = SITE_URL
ea211ac Akshay Aurora Add favicons for staging and local servers
iakshay authored
32 STAGING_URL = PROTOCOL + 'developer.allizom.org'
12b9f6f Les Orchard Enable USE_X_FORWARDED_HOST by default
lmorchard authored
33 USE_X_FORWARDED_HOST = True
ad38a43 David Walsh fix bug 771714 - Set absolute avatar URL
darkwing authored
34
b9c6776 luke crouch Revert "Use Memcache and clean up caching setup."
groovecoder authored
35 MANAGERS = ADMINS
36
e3f86da django skeleton
James Socol authored
37 DATABASES = {
38 'default': {
8eb19c6 ricky rosario Implemented questions template (bug 565367)
rlr authored
39 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
4a6f634 luke crouch default database name
groovecoder authored
40 'NAME': 'kuma', # Or path to database file if using sqlite3.
8eb19c6 ricky rosario Implemented questions template (bug 565367)
rlr authored
41 'USER': '', # Not used with sqlite3.
42 'PASSWORD': '', # Not used with sqlite3.
43 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
44 'PORT': '', # Set to empty string for default. Not used with sqlite3.
6667c90 Fixing errors found by check.py
James Socol authored
45 'OPTIONS': {'init_command': 'SET storage_engine=InnoDB'},
e5cb02f Les Orchard deki-migration: Baby steps toward getting deki pages into kuma
lmorchard authored
46 },
369b9a7 Les Orchard deki-migration: Move the wikidb settings out of the general list of DB c...
lmorchard authored
47 }
48
49 MIGRATION_DATABASES = {
e5cb02f Les Orchard deki-migration: Baby steps toward getting deki pages into kuma
lmorchard authored
50 'wikidb': {
51 'NAME': 'wikidb',
52 'ENGINE': 'django.db.backends.mysql',
53 'HOST': 'localhost',
54 'USER': 'wikiuser',
55 'PASSWORD': 'wikipass',
56 },
e3f86da django skeleton
James Socol authored
57 }
58
b9c6776 luke crouch Revert "Use Memcache and clean up caching setup."
groovecoder authored
59 # Cache Settings
5936c3a Jannis Leidel Added new "memcache" caching backend to be used by Jinja2 and constance.
jezdez authored
60 CACHE_PREFIX = 'kuma'
61 CACHE_COUNT_TIMEOUT = 60 # in seconds
b9c6776 luke crouch Revert "Use Memcache and clean up caching setup."
groovecoder authored
62
312a88e James Bennett First draft of Django 1.5 logging configuration.
ubernostrum authored
63 CACHES = {
64 'default': {
b9c6776 luke crouch Revert "Use Memcache and clean up caching setup."
groovecoder authored
65 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
5936c3a Jannis Leidel Added new "memcache" caching backend to be used by Jinja2 and constance.
jezdez authored
66 'TIMEOUT': CACHE_COUNT_TIMEOUT,
67 'KEY_PREFIX': CACHE_PREFIX,
2fbcf29 Les Orchard bug 912084: Cache wiki URL remap queries
lmorchard authored
68 },
5936c3a Jannis Leidel Added new "memcache" caching backend to be used by Jinja2 and constance.
jezdez authored
69 'memcache': {
70 'BACKEND': 'memcached_hashring.backend.MemcachedHashRingCache',
71 'TIMEOUT': CACHE_COUNT_TIMEOUT * 60,
72 'KEY_PREFIX': CACHE_PREFIX,
73 'LOCATION': ['127.0.0.1:11211'],
74 },
312a88e James Bennett First draft of Django 1.5 logging configuration.
ubernostrum authored
75 }
76
03b9b54 Adding default email addresses to settings.
James Socol authored
77 # Addresses email comes from
d7dc4c8 luke crouch bug 634402 mdn settings to fix mdn tests
groovecoder authored
78 DEFAULT_FROM_EMAIL = 'notifications@developer.mozilla.org'
79 SERVER_EMAIL = 'server-error@developer.mozilla.org'
09336ac Adding default caching info to settings.py
James Socol authored
80
39ad6fe [bug 595370] Add the server name to the wsgi environment.
James Socol authored
81 PLATFORM_NAME = platform.node()
82
e3f86da django skeleton
James Socol authored
83 # Local time zone for this installation. Choices can be found here:
84 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
85 # although not all choices may be available on all operating systems.
86 # If running in a Windows environment this must be set to the same as your
87 # system time zone.
aa13ae9 Paul Craciunoiu Add Jinja function datetimeformat, use babel and pytz, add tests, add 'N...
pcraciunoiu authored
88 TIME_ZONE = 'US/Pacific'
e3f86da django skeleton
James Socol authored
89
90 # Language code for this installation. All choices can be found here:
91 # http://www.i18nguy.com/unicode/language-identifiers.html
d03b6f8 Adding middleware and tests. Removing dependency on django-localeurl. Ad...
James Socol authored
92 LANGUAGE_CODE = 'en-US'
93
a7cfcfd luke crouch bug 634402 bug 634263 move mdn apps into kuma; functional but mis-styled
groovecoder authored
94 # Accepted locales
4ff4077 luke crouch add Tamil (ta) and Hindi (hi-IN) locales
groovecoder authored
95 MDN_LANGUAGES = (
96 'en-US',
6c9f215 Jannis Leidel fix bug 1097163 - added Afrikaans, Xhosa and Zulu to list of supported l...
jezdez authored
97 'af',
4ff4077 luke crouch add Tamil (ta) and Hindi (hi-IN) locales
groovecoder authored
98 'ar',
53b688d fix bug 1125648
Emin Mastizada authored
99 'az',
4ff4077 luke crouch add Tamil (ta) and Hindi (hi-IN) locales
groovecoder authored
100 'bn-BD',
c888202 luke crouch fix bug 1088403 - add bn-IN locale
groovecoder authored
101 'bn-IN',
003cb37 luke crouch fix bug 1124423 - add African languages
groovecoder authored
102 'cs',
103 'ca',
4ff4077 luke crouch add Tamil (ta) and Hindi (hi-IN) locales
groovecoder authored
104 'de',
003cb37 luke crouch fix bug 1124423 - add African languages
groovecoder authored
105 'ee',
4ff4077 luke crouch add Tamil (ta) and Hindi (hi-IN) locales
groovecoder authored
106 'el',
107 'es',
108 'fa',
109 'fi',
110 'fr',
111 'fy-NL',
112 'ga-IE',
003cb37 luke crouch fix bug 1124423 - add African languages
groovecoder authored
113 'ha',
4ff4077 luke crouch add Tamil (ta) and Hindi (hi-IN) locales
groovecoder authored
114 'he',
115 'hi-IN',
116 'hr',
117 'hu',
118 'id',
003cb37 luke crouch fix bug 1124423 - add African languages
groovecoder authored
119 'ig',
4ff4077 luke crouch add Tamil (ta) and Hindi (hi-IN) locales
groovecoder authored
120 'it',
121 'ja',
122 'ka',
123 'ko',
003cb37 luke crouch fix bug 1124423 - add African languages
groovecoder authored
124 'ln',
3a4225e luke crouch fix bug 1023410 - add malayalam locale
groovecoder authored
125 'ml',
4ff4077 luke crouch add Tamil (ta) and Hindi (hi-IN) locales
groovecoder authored
126 'ms',
127 'nl',
128 'pl',
129 'pt-BR',
130 'pt-PT',
131 'ro',
132 'ru',
133 'sq',
003cb37 luke crouch fix bug 1124423 - add African languages
groovecoder authored
134 'sw',
4ff4077 luke crouch add Tamil (ta) and Hindi (hi-IN) locales
groovecoder authored
135 'ta',
136 'th',
137 'tr',
138 'vi',
003cb37 luke crouch fix bug 1124423 - add African languages
groovecoder authored
139 'wo',
6c9f215 Jannis Leidel fix bug 1097163 - added Afrikaans, Xhosa and Zulu to list of supported l...
jezdez authored
140 'xh',
003cb37 luke crouch fix bug 1124423 - add African languages
groovecoder authored
141 'yo',
4ff4077 luke crouch add Tamil (ta) and Hindi (hi-IN) locales
groovecoder authored
142 'zh-CN',
6c9f215 Jannis Leidel fix bug 1097163 - added Afrikaans, Xhosa and Zulu to list of supported l...
jezdez authored
143 'zh-TW',
144 'zu',
4ff4077 luke crouch add Tamil (ta) and Hindi (hi-IN) locales
groovecoder authored
145 )
146
147 RTL_LANGUAGES = (
148 'ar',
149 'fa',
150 'fa-IR',
151 'he'
152 )
a7cfcfd luke crouch bug 634402 bug 634263 move mdn apps into kuma; functional but mis-styled
groovecoder authored
153
f2c1f8b luke crouch bug 664330 lazy language approach from playdoh and DEV_LANGUAGES for x-t...
groovecoder authored
154 DEV_POOTLE_PRODUCT_DETAILS_MAP = {
155 'pt': 'pt-PT',
156 'fy': 'fy-NL',
157 'xx-testing': 'x-testing',
158 }
a7cfcfd luke crouch bug 634402 bug 634263 move mdn apps into kuma; functional but mis-styled
groovecoder authored
159
b3e82bc Gordon P. Hemsley Improve support for the user's language preferences.
GPHemsley authored
160 # Override generic locale handling with explicit mappings.
161 # Keys are the requested locale; values are the delivered locale.
162 LOCALE_ALIASES = {
163 # Treat "English (United States)" as the canonical "English".
164 'en': 'en-US',
165
166 # Create aliases for over-specific locales.
167 'bn': 'bn-BD',
168 'fy': 'fy-NL',
169 'ga': 'ga-IE',
170 'gu': 'gu-IN',
171 'hi': 'hi-IN',
172 'hy': 'hy-AM',
173 'pa': 'pa-IN',
174 'sv': 'sv-SE',
175 'ta': 'ta-LK',
176
177 # Map a prefix to one of its multiple specific locales.
178 'pt': 'pt-PT',
179 'sr': 'sr-Cyrl',
180 'zh': 'zh-CN',
181
182 # Create aliases for locales which do not share a prefix.
183 'nb-NO': 'no',
184 'nn-NO': 'no',
185
186 # Create aliases for locales which use region subtags to assume scripts.
187 'zh-Hans': 'zh-CN',
188 'zh-Hant': 'zh-TW',
2a8d335 luke crouch fix bug 647796 - better accept-language logic
groovecoder authored
189 }
190
f2c1f8b luke crouch bug 664330 lazy language approach from playdoh and DEV_LANGUAGES for x-t...
groovecoder authored
191 try:
192 DEV_LANGUAGES = [
c6183e1 Jannis Leidel Bug 756533 - Move the LOCALES setting population inline.
jezdez authored
193 loc.replace('_', '-') for loc in os.listdir(path('locale'))
194 if (os.path.isdir(path('locale', loc)) and
195 loc not in ['.svn', '.git', 'templates'])
f2c1f8b luke crouch bug 664330 lazy language approach from playdoh and DEV_LANGUAGES for x-t...
groovecoder authored
196 ]
197 for pootle_dir in DEV_LANGUAGES:
198 if pootle_dir in DEV_POOTLE_PRODUCT_DETAILS_MAP:
199 DEV_LANGUAGES.remove(pootle_dir)
200 DEV_LANGUAGES.append(DEV_POOTLE_PRODUCT_DETAILS_MAP[pootle_dir])
201 except OSError:
202 DEV_LANGUAGES = ('en-US',)
203
204 PROD_LANGUAGES = MDN_LANGUAGES
205
bd4fb53 Les Orchard Performance: Build LANGUAGE_URL_MAP once on startup, rather than lazily ...
lmorchard authored
206 LANGUAGE_URL_MAP = dict([(i.lower(), i) for i in PROD_LANGUAGES])
207 for requested_lang, delivered_lang in LOCALE_ALIASES.items():
208 if delivered_lang in PROD_LANGUAGES:
209 LANGUAGE_URL_MAP[requested_lang.lower()] = delivered_lang
d03b6f8 Adding middleware and tests. Removing dependency on django-localeurl. Ad...
James Socol authored
210
c6183e1 Jannis Leidel Bug 756533 - Move the LOCALES setting population inline.
jezdez authored
211
212 def get_locales():
213 locales = {}
214 file = os.path.join(ROOT, 'kuma', 'languages.json')
215 json_locales = json.load(open(file, 'r'))
216 for locale, meta in json_locales.items():
003cb37 luke crouch fix bug 1124423 - add African languages
groovecoder authored
217 locales[locale] = _Language(meta['English'],
c6183e1 Jannis Leidel Bug 756533 - Move the LOCALES setting population inline.
jezdez authored
218 meta['native'],
003cb37 luke crouch fix bug 1124423 - add African languages
groovecoder authored
219 locale)
c6183e1 Jannis Leidel Bug 756533 - Move the LOCALES setting population inline.
jezdez authored
220 return locales
221
222 LOCALES = get_locales()
223
224
f2c1f8b luke crouch bug 664330 lazy language approach from playdoh and DEV_LANGUAGES for x-t...
groovecoder authored
225 def lazy_langs():
c6183e1 Jannis Leidel Bug 756533 - Move the LOCALES setting population inline.
jezdez authored
226 """Override Django's built-in with our native names"""
f2c1f8b luke crouch bug 664330 lazy language approach from playdoh and DEV_LANGUAGES for x-t...
groovecoder authored
227 from product_details import product_details
8031402 luke crouch bug 690399 disabling DEV_LANGUAGES until we're ready for it
groovecoder authored
228 # for bug 664330
2cbfc81 luke crouch Fix Bug 690399 no more stage languages for url map
groovecoder authored
229 # from django.conf import settings
8031402 luke crouch bug 690399 disabling DEV_LANGUAGES until we're ready for it
groovecoder authored
230 # langs = DEV_LANGUAGES if (getattr(settings, 'DEV', False) or getattr(settings, 'STAGE', False)) else PROD_LANGUAGES
231 langs = PROD_LANGUAGES
f2c1f8b luke crouch bug 664330 lazy language approach from playdoh and DEV_LANGUAGES for x-t...
groovecoder authored
232 return dict([(lang.lower(), product_details.languages[lang]['native'])
233 for lang in langs])
234
c80e703 Jannis Leidel Embed JavaScript translation into page.
jezdez authored
235 LANGUAGES_DICT = lazy(lazy_langs, dict)()
236 LANGUAGES = sorted(tuple([(i, LOCALES[i].native) for i in MDN_LANGUAGES]),
237 key=lambda lang:lang[0])
f2c1f8b luke crouch bug 664330 lazy language approach from playdoh and DEV_LANGUAGES for x-t...
groovecoder authored
238
239 # DEKI uses different locale keys
240 def lazy_language_deki_map():
8031402 luke crouch bug 690399 disabling DEV_LANGUAGES until we're ready for it
groovecoder authored
241 # for bug 664330
2cbfc81 luke crouch Fix Bug 690399 no more stage languages for url map
groovecoder authored
242 # from django.conf import settings
8031402 luke crouch bug 690399 disabling DEV_LANGUAGES until we're ready for it
groovecoder authored
243 # langs = DEV_LANGUAGES if (getattr(settings, 'DEV', False) or getattr(settings, 'STAGE', False)) else PROD_LANGUAGES
244 langs = PROD_LANGUAGES
907bce9 luke crouch bug 664330 try/except safety when settings_local.py doesn't include DEV ...
groovecoder authored
245 lang_deki_map = dict([(i, i) for i in langs])
f2c1f8b luke crouch bug 664330 lazy language approach from playdoh and DEV_LANGUAGES for x-t...
groovecoder authored
246 lang_deki_map['en-US'] = 'en'
247 lang_deki_map['zh-CN'] = 'cn'
248 lang_deki_map['zh-TW'] = 'zh_tw'
249 return lang_deki_map
250
251 LANGUAGE_DEKI_MAP = lazy(lazy_language_deki_map, dict)()
d03b6f8 Adding middleware and tests. Removing dependency on django-localeurl. Ad...
James Socol authored
252
0f1ed89 Les Orchard fix bug 710724, bug 717445: Migrate locales, separate UI and doc locale
lmorchard authored
253 # List of MindTouch locales mapped to Kuma locales.
b3e82bc Gordon P. Hemsley Improve support for the user's language preferences.
GPHemsley authored
254 #
0f1ed89 Les Orchard fix bug 710724, bug 717445: Migrate locales, separate UI and doc locale
lmorchard authored
255 # Language in MindTouch pages are first determined from the locale in the page
256 # title, with a fallback to the language in the page record.
257 #
258 # So, first MindTouch locales were inventoried like so:
259 #
260 # mysql --skip-column-names -uroot wikidb -B \
261 # -e 'select page_title from pages where page_namespace=0' \
262 # > page-titles.txt
263 #
264 # grep '/' page-titles.txt | cut -d'/' -f1 | sort -f | uniq -ci | sort -rn
265 #
266 # Then, the database languages were inventoried like so:
267 #
b3e82bc Gordon P. Hemsley Improve support for the user's language preferences.
GPHemsley authored
268 # select page_language, count(page_id) as ct
0f1ed89 Les Orchard fix bug 710724, bug 717445: Migrate locales, separate UI and doc locale
lmorchard authored
269 # from pages group by page_language order by ct desc;
270 #
271 # Also worth noting, these are locales configured in the prod Control Panel:
272 #
273 # en,ar,ca,cs,de,el,es,fa,fi,fr,he,hr,hu,it,ja,
274 # ka,ko,nl,pl,pt,ro,ru,th,tr,uk,vi,zh-cn,zh-tw
b3e82bc Gordon P. Hemsley Improve support for the user's language preferences.
GPHemsley authored
275 #
0f1ed89 Les Orchard fix bug 710724, bug 717445: Migrate locales, separate UI and doc locale
lmorchard authored
276 # The Kuma side was picked from elements of the MDN_LANGUAGES list in
277 # settings.py, and a few were added to match MindTouch locales.
278 #
279 # Most of these end up being direct mappings, but it's instructive to go
280 # through the mapping exercise.
281
282 MT_TO_KUMA_LOCALE_MAP = {
283 "en" : "en-US",
284 "ja" : "ja",
285 "pl" : "pl",
286 "fr" : "fr",
287 "es" : "es",
288 "" : "en-US",
289 "cn" : "zh-CN",
290 "zh_cn" : "zh-CN",
291 "zh-cn" : "zh-CN",
292 "zh_tw" : "zh-TW",
293 "zh-tw" : "zh-TW",
294 "ko" : "ko",
295 "pt" : "pt-PT",
296 "de" : "de",
297 "it" : "it",
298 "ca" : "ca",
299 "cs" : "cs",
300 "ru" : "ru",
301 "nl" : "nl",
302 "hu" : "hu",
303 "he" : "he",
304 "el" : "el",
305 "fi" : "fi",
306 "tr" : "tr",
307 "vi" : "vi",
308 "ro" : "ro",
309 "ar" : "ar",
310 "th" : "th",
311 "fa" : "fa",
312 "ka" : "ka",
313 }
314
06167d9 Creating locale submodule, and tweaking some settings so it works.
James Socol authored
315 TEXT_DOMAIN = 'messages'
e3f86da django skeleton
James Socol authored
316
317 SITE_ID = 1
2a1a7ab Paul Craciunoiu Adding context processor for site title
pcraciunoiu authored
318
230f8bf luke crouch bug 659358 move product details and mdc pages out of repos to avoid perm...
groovecoder authored
319 PROD_DETAILS_DIR = path('../product_details_json')
320 MDC_PAGES_DIR = path('../mdc_pages')
e3f86da django skeleton
James Socol authored
321
322 # If you set this to False, Django will make some optimizations so as not
323 # to load the internationalization machinery.
324 USE_I18N = True
d03b6f8 Adding middleware and tests. Removing dependency on django-localeurl. Ad...
James Socol authored
325 USE_L10N = True
19d7912 luke crouch LOCALE_PATHS needs to be a tuple
groovecoder authored
326 LOCALE_PATHS = (
327 path('locale'),
328 )
e3f86da django skeleton
James Socol authored
329
330 # Absolute path to the directory that holds media.
331 # Example: "/home/media/media.lawrence.com/"
e6f8ac3 Getting basic settings in place
James Socol authored
332 MEDIA_ROOT = path('media')
e3f86da django skeleton
James Socol authored
333
398e9a8 luke crouch Bug 681124 move humans.txt file to media root
groovecoder authored
334 # Absolute path to the directory for the humans.txt file.
335 HUMANSTXT_ROOT = MEDIA_ROOT
336
e3f86da django skeleton
James Socol authored
337 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
338 # trailing slash if there is a path component (optional in other cases).
339 # Examples: "http://media.lawrence.com", "http://example.com/media/"
e6f8ac3 Getting basic settings in place
James Socol authored
340 MEDIA_URL = '/media/'
49d06f4 Changes from local testing.
James Socol authored
341 STATIC_URL = '/static/'
18028cb luke crouch fix django admin statics
groovecoder authored
342 STATIC_ROOT = path('static')
e3f86da django skeleton
James Socol authored
343
d7dc4c8 luke crouch bug 634402 mdn settings to fix mdn tests
groovecoder authored
344 SERVE_MEDIA = False
345
d03b6f8 Adding middleware and tests. Removing dependency on django-localeurl. Ad...
James Socol authored
346 # Paths that don't require a locale prefix.
31c1702 Jannis Leidel Updated URL resolver to use startswith to decide which path needs a lang...
jezdez authored
347 LANGUAGE_URL_IGNORED_PATHS = (
348 'media',
349 'admin',
350 'robots.txt',
2061a37 Jannis Leidel fix bug 1070942 - add a contribute.json file
jezdez authored
351 'contribute.json',
31c1702 Jannis Leidel Updated URL resolver to use startswith to decide which path needs a lang...
jezdez authored
352 'services',
353 'static',
354 '1',
355 'files',
356 '@api',
357 'grappelli',
358 '__debug__',
359 '.well-known',
7258e04 Jannis Leidel Fetch the CSRF middleware token from the site before submitting the Pers...
jezdez authored
360 'users/persona/',
31c1702 Jannis Leidel Updated URL resolver to use startswith to decide which path needs a lang...
jezdez authored
361 'users/github/login/callback/',
362 )
d03b6f8 Adding middleware and tests. Removing dependency on django-localeurl. Ad...
James Socol authored
363
e3f86da django skeleton
James Socol authored
364 # Make this unique, and don't share it with anybody.
365 SECRET_KEY = '#%tc(zja8j01!r#h_y)=hy!^k)9az74k+-ib&ij&+**s3-e^_z'
366
367 # List of callables that know how to import templates from various sources.
368 TEMPLATE_LOADERS = (
690f347 Berker Peksag Update Jingo version to 0.6.1.
berkerpeksag authored
369 'jingo.Loader',
e3f86da django skeleton
James Socol authored
370 'django.template.loaders.filesystem.Loader',
371 'django.template.loaders.app_directories.Loader',
372 )
373
6a8ea90 Les Orchard but 768498: Second part of access control changes
lmorchard authored
374 JINGO_EXCLUDE_APPS = (
375 'admin',
376 'grappelli',
8520399 Les Orchard Install django-allauth 0.16.1
lmorchard authored
377 'waffle',
7d0e5b5 Jannis Leidel Make sure the logout template used by grappelli works.
jezdez authored
378 'registration',
6a8ea90 Les Orchard but 768498: Second part of access control changes
lmorchard authored
379 )
380
899dcd3 Adding request processor to settings.py
James Socol authored
381 TEMPLATE_CONTEXT_PROCESSORS = (
312a88e James Bennett First draft of Django 1.5 logging configuration.
ubernostrum authored
382 'django.contrib.auth.context_processors.auth',
899dcd3 Adding request processor to settings.py
James Socol authored
383 'django.core.context_processors.debug',
384 'django.core.context_processors.media',
385 'django.core.context_processors.request',
d7dc4c8 luke crouch bug 634402 mdn settings to fix mdn tests
groovecoder authored
386 'django.core.context_processors.csrf',
2a1a7ab Paul Craciunoiu Adding context processor for site title
pcraciunoiu authored
387 'django.contrib.messages.context_processors.messages',
26e2d76 Paul Craciunoiu Adding a login form and REGISTER_URL
pcraciunoiu authored
388
8520399 Les Orchard Install django-allauth 0.16.1
lmorchard authored
389 'allauth.account.context_processors.account',
390 'allauth.socialaccount.context_processors.socialaccount',
391
47dadab Jannis Leidel Bug 756533 - Move the used part of the sumo app into kuma.core.
jezdez authored
392 'kuma.core.context_processors.global_settings',
00f2d65 Jannis Leidel Bug 756533 - Merge devmo app into kuma.core.
jezdez authored
393 'kuma.core.context_processors.i18n',
394 'kuma.core.context_processors.next_url',
d7dc4c8 luke crouch bug 634402 mdn settings to fix mdn tests
groovecoder authored
395
b448c41 [bug 591029] Use a different context preprocessor.
James Socol authored
396 'jingo_minify.helpers.build_ids',
b84ef6f Les Orchard Bug 706526 - browserid: Display sign in only for supported locales (en-u...
lmorchard authored
397 'constance.context_processors.config',
87a6c40 Jesus Perez fix bug 1030629 - search filter
tx2z authored
398
306a5ea Jannis Leidel fix bug 1073473 - Move search app into kuma namespace.
jezdez authored
399 'kuma.search.context_processors.search_filters',
899dcd3 Adding request processor to settings.py
James Socol authored
400 )
401
e3f86da django skeleton
James Socol authored
402 MIDDLEWARE_CLASSES = (
2ab1e82 Erik Rose [573546] Wrap each request in a transaction.
erikrose authored
403 # This gives us atomic success or failure on multi-row writes. It does not
404 # give us a consistent per-transaction snapshot for reads; that would need
405 # the serializable isolation level (which InnoDB does support) and code to
406 # retry transactions that roll back due to serialization failures. It's a
407 # possibility for the future. Keep in mind that memcache defeats
408 # snapshotted reads where we don't explicitly use the "uncached" manager.
409 'django.middleware.transaction.TransactionMiddleware',
410
c7da7d9 Erik Rose [590776] LocaleURLMiddleware's setting of a thread-local prefixer is now...
erikrose authored
411 # LocaleURLMiddleware must be before any middleware that uses
47dadab Jannis Leidel Bug 756533 - Move the used part of the sumo app into kuma.core.
jezdez authored
412 # kuma.core.urlresolvers.reverse() to add locale prefixes to URLs:
413 'kuma.core.middleware.LocaleURLMiddleware',
8d12fe3 James Bennett Move wiki app.
ubernostrum authored
414 'kuma.wiki.middleware.DocumentZoneMiddleware',
415 'kuma.wiki.middleware.ReadOnlyMiddleware',
47dadab Jannis Leidel Bug 756533 - Move the used part of the sumo app into kuma.core.
jezdez authored
416 'kuma.core.middleware.Forbidden403Middleware',
e3f86da django skeleton
James Socol authored
417 'django.middleware.common.CommonMiddleware',
47dadab Jannis Leidel Bug 756533 - Move the used part of the sumo app into kuma.core.
jezdez authored
418 'kuma.core.middleware.RemoveSlashMiddleware',
ad69153 Paul Craciunoiu Adding TikiUser and Session models, tests, and NoVarySessionMiddleware.
pcraciunoiu authored
419 'commonware.middleware.NoVarySessionMiddleware',
d63d0f4 James Bennett Fix bug 856124: Use Django's X-Frame-Options middleware.
ubernostrum authored
420 'django.middleware.clickjacking.XFrameOptionsMiddleware',
e3f86da django skeleton
James Socol authored
421 'django.middleware.csrf.CsrfViewMiddleware',
422 'django.contrib.auth.middleware.AuthenticationMiddleware',
423 'django.contrib.messages.middleware.MessageMiddleware',
47dadab Jannis Leidel Bug 756533 - Move the used part of the sumo app into kuma.core.
jezdez authored
424 'kuma.core.anonymous.AnonymousIdentityMiddleware',
d7dc4c8 luke crouch bug 634402 mdn settings to fix mdn tests
groovecoder authored
425 'django.contrib.sessions.middleware.SessionMiddleware',
049f051 Jannis Leidel Moved users app into kuma namespace.
jezdez authored
426 'kuma.users.middleware.BanMiddleware',
5371d54 luke crouch bug 1113260 - add django-banish to ban by IP
groovecoder authored
427 'banish.middleware.BanishMiddleware',
b872fe2 Les Orchard bug 960835: First steps toward integrating django-badger views
lmorchard authored
428
429 'badger.middleware.RecentBadgeAwardsMiddleware',
8d12fe3 James Bennett Move wiki app.
ubernostrum authored
430 'kuma.wiki.badges.BadgeAwardingMiddleware',
ad69153 Paul Craciunoiu Adding TikiUser and Session models, tests, and NoVarySessionMiddleware.
pcraciunoiu authored
431 )
432
433 # Auth
434 AUTHENTICATION_BACKENDS = (
77f6eef Jannis Leidel Removed a bunch of django-browserid code.
jezdez authored
435 'allauth.account.auth_backends.AuthenticationBackend',
5280689 Les Orchard bug 768498: Initial steps toward access control for wiki with teams & po...
lmorchard authored
436 'teamwork.backends.TeamworkBackend',
e3f86da django skeleton
James Socol authored
437 )
3d984bc Jannis Leidel Moved user profile model from devmo into users app.
jezdez authored
438 AUTH_PROFILE_MODULE = 'users.UserProfile'
d7dc4c8 luke crouch bug 634402 mdn settings to fix mdn tests
groovecoder authored
439
312a88e James Bennett First draft of Django 1.5 logging configuration.
ubernostrum authored
440 PASSWORD_HASHERS = (
049f051 Jannis Leidel Moved users app into kuma namespace.
jezdez authored
441 'kuma.users.backends.Sha256Hasher',
312a88e James Bennett First draft of Django 1.5 logging configuration.
ubernostrum authored
442 'django.contrib.auth.hashers.SHA1PasswordHasher',
443 'django.contrib.auth.hashers.MD5PasswordHasher',
444 'django.contrib.auth.hashers.UnsaltedMD5PasswordHasher',
445 )
446
aa9921d Move avatars up one level.
James Socol authored
447 USER_AVATAR_PATH = 'uploads/avatars/'
5ea0083 luke crouch show contributors' avatars at top of articles
groovecoder authored
448 DEFAULT_AVATAR = MEDIA_URL + 'img/avatar.png'
8b674ba Paul Craciunoiu [478929] Resize avatars and restrict upload size.
pcraciunoiu authored
449 AVATAR_SIZE = 48 # in pixels
a10cdef ricky rosario Implemented user account activation via confirmation email. [bug 614703]
rlr authored
450 ACCOUNT_ACTIVATION_DAYS = 30
8b674ba Paul Craciunoiu [478929] Resize avatars and restrict upload size.
pcraciunoiu authored
451 MAX_AVATAR_FILE_SIZE = 131072 # 100k, in bytes
e3f86da django skeleton
James Socol authored
452
49d06f4 Changes from local testing.
James Socol authored
453 ROOT_URLCONF = 'urls'
e3f86da django skeleton
James Socol authored
454
455 TEMPLATE_DIRS = (
bbd7660 use settings for SEARCH_MAX_RESULTS
James Socol authored
456 # Put strings here, like "/home/html/django_templates"
e3f86da django skeleton
James Socol authored
457 # Always use forward slashes, even on Windows.
458 # Don't forget to use absolute paths, not relative paths.
e6f8ac3 Getting basic settings in place
James Socol authored
459 path('templates'),
e3f86da django skeleton
James Socol authored
460 )
461
6a8ea90 Les Orchard but 768498: Second part of access control changes
lmorchard authored
462 STATICFILES_FINDERS = (
463 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
464 'django.contrib.staticfiles.finders.FileSystemFinder',
465 )
466
2babd7c Erik Rose [569285] Implement question tagging based on django-taggit, which has a ...
erikrose authored
467 # TODO: Figure out why changing the order of apps (for example, moving taggit
468 # higher in the list) breaks tests.
e3f86da django skeleton
James Socol authored
469 INSTALLED_APPS = (
a7cfcfd luke crouch bug 634402 bug 634263 move mdn apps into kuma; functional but mis-styled
groovecoder authored
470 # django
e3f86da django skeleton
James Socol authored
471 'django.contrib.auth',
472 'django.contrib.contenttypes',
473 'django.contrib.sessions',
474 'django.contrib.sites',
475 'django.contrib.messages',
6a8ea90 Les Orchard but 768498: Second part of access control changes
lmorchard authored
476
477 'grappelli.dashboard',
478 'grappelli',
ead763b Paul Craciunoiu Enable admin and add model forums.Forum to it.
pcraciunoiu authored
479 'django.contrib.admin',
0a615cf David Walsh Misc small wiki updates, adding homepage stylesheet
darkwing authored
480
db8ed07 David Walsh fix bug 780740 - Creates sitemap.xml for MDN
darkwing authored
481 'django.contrib.sitemaps',
18028cb luke crouch fix django admin statics
groovecoder authored
482 'django.contrib.staticfiles',
64ddafd luke crouch Fix Bug 711728 global-notice div for soapbox messages
groovecoder authored
483
a7cfcfd luke crouch bug 634402 bug 634263 move mdn apps into kuma; functional but mis-styled
groovecoder authored
484 # MDN
00f2d65 Jannis Leidel Bug 756533 - Merge devmo app into kuma.core.
jezdez authored
485 'kuma.core',
e3c7a0c James Bennett Move feeder app.
ubernostrum authored
486 'kuma.feeder',
34c4df0 Jannis Leidel Bug 756533 - Moved landing app into kuma namespace.
jezdez authored
487 'kuma.landing',
306a5ea Jannis Leidel fix bug 1073473 - Move search app into kuma namespace.
jezdez authored
488 'kuma.search',
049f051 Jannis Leidel Moved users app into kuma namespace.
jezdez authored
489 'kuma.users',
8d12fe3 James Bennett Move wiki app.
ubernostrum authored
490 'kuma.wiki',
58093b0 James Bennett Fix bug 1057286: Split file attachments from wiki into a separate applic...
ubernostrum authored
491 'kuma.attachments',
c5f827b Jannis Leidel WIP
jezdez authored
492 'allauth',
493 'allauth.account',
494 'allauth.socialaccount',
b1ba2b5 Jannis Leidel Added an own Persona provider that adds a session modification hack that...
jezdez authored
495 'kuma.users.providers.persona',
bee83a5 Jannis Leidel Wrote custom Github provider for allauth.
jezdez authored
496 'kuma.users.providers.github',
da6613b Jannis Leidel Move events app into own app under the new kuma namespace.
jezdez authored
497 'kuma.events',
64ddafd luke crouch Fix Bug 711728 global-notice div for soapbox messages
groovecoder authored
498
a7cfcfd luke crouch bug 634402 bug 634263 move mdn apps into kuma; functional but mis-styled
groovecoder authored
499 # DEMOS
d1c6c69 James Bennett Refactor/rewrite imports, URL reverses and settings due to move of demos...
ubernostrum authored
500 'kuma.demos',
a7cfcfd luke crouch bug 634402 bug 634263 move mdn apps into kuma; functional but mis-styled
groovecoder authored
501 'captcha',
5e81310 Jannis Leidel Bug 756533 - Move contentflagging app into kuma namespace.
jezdez authored
502 'kuma.contentflagging',
9babfb8 Jannis Leidel Bug 756533 - Move actioncounters app into kuma namespace.
jezdez authored
503 'kuma.actioncounters',
a7cfcfd luke crouch bug 634402 bug 634263 move mdn apps into kuma; functional but mis-styled
groovecoder authored
504 'threadedcomments',
64ddafd luke crouch Fix Bug 711728 global-notice div for soapbox messages
groovecoder authored
505
a7cfcfd luke crouch bug 634402 bug 634263 move mdn apps into kuma; functional but mis-styled
groovecoder authored
506 # util
507 'jingo_minify',
0298e71 Erik Rose Start wiki app and add skeletal models.
erikrose authored
508 'product_details',
a7cfcfd luke crouch bug 634402 bug 634263 move mdn apps into kuma; functional but mis-styled
groovecoder authored
509 'tower',
cba49f4 Les Orchard Enable django-smuggler app for data import/export from admin
lmorchard authored
510 'smuggler',
868e94b Les Orchard bug 672238 and bug 683919 - Dynamic config and Dev Derby
lmorchard authored
511 'constance.backends.database',
512 'constance',
513 'waffle',
64ddafd luke crouch Fix Bug 711728 global-notice div for soapbox messages
groovecoder authored
514 'soapbox',
d808237 Jannis Leidel Bug 756533 - Moved authkeys app into kuma namespace.
jezdez authored
515 'kuma.authkeys',
f31022b luke crouch bug 859875 - watch page for email notification
groovecoder authored
516 'tidings',
5280689 Les Orchard bug 768498: Initial steps toward access control for wiki with teams & po...
lmorchard authored
517 'teamwork',
a1d8f69 Les Orchard fix bug 766256: Add rabbitmq & celery to vagrant
lmorchard authored
518 'djcelery',
0ed30a4 Les Orchard Enable taggit app;
lmorchard authored
519 'taggit',
61aed36 Jannis Leidel Refactored search view to be API based and implemented complex filters.
jezdez authored
520 'dbgettext',
5371d54 luke crouch bug 1113260 - add django-banish to ban by IP
groovecoder authored
521 'banish',
084dded luke crouch bug 1119532 - add honeypot across all MDN forms
groovecoder authored
522 'honeypot',
7e374d0 luke crouch fix bug 795356 - use sentry (errormill.mozilla.org)
groovecoder authored
523
823d22f Jannis Leidel fix bug 1057291 - move dashboards app into kuma namespace.
jezdez authored
524 'kuma.dashboards',
c80e703 Jannis Leidel Embed JavaScript translation into page.
jezdez authored
525 'statici18n',
da6613b Jannis Leidel Move events app into own app under the new kuma namespace.
jezdez authored
526 'rest_framework',
a7cfcfd luke crouch bug 634402 bug 634263 move mdn apps into kuma; functional but mis-styled
groovecoder authored
527
ba5bbe6 Les Orchard Bug 670785 - profile: basic info (in progress)
lmorchard authored
528 # migrations
529 'south',
530
a7cfcfd luke crouch bug 634402 bug 634263 move mdn apps into kuma; functional but mis-styled
groovecoder authored
531 # testing.
118c6d3 Paul Craciunoiu [bug 616561] Remove unused settings.
pcraciunoiu authored
532 'django_nose',
533 'test_utils',
c70b079 Started the app for generating humans.txt file. Starting with github com...
BuddyL authored
534
535 # other
687b6aa James Bennett Move humans app.
ubernostrum authored
536 'kuma.humans',
b872fe2 Les Orchard bug 960835: First steps toward integrating django-badger views
lmorchard authored
537
538 'badger',
118c6d3 Paul Craciunoiu [bug 616561] Remove unused settings.
pcraciunoiu authored
539 )
a927cfb Build scripts!
James Socol authored
540
82d584e groundwork for running tests
James Socol authored
541 TEST_RUNNER = 'test_utils.runner.RadicalTestSuiteRunner'
da6613b Jannis Leidel Move events app into own app under the new kuma namespace.
jezdez authored
542
543 NOSE_ARGS = [
544 '--traverse-namespace', # make sure `./manage.py test kuma` works
545 ]
546
8d435a7 Paul Craciunoiu [586176] Deleting image leaves thumbnail behind.
pcraciunoiu authored
547 TEST_UTILS_NO_TRUNCATE = ('django_content_type',)
82d584e groundwork for running tests
James Socol authored
548
a7cfcfd luke crouch bug 634402 bug 634263 move mdn apps into kuma; functional but mis-styled
groovecoder authored
549 # Feed fetcher config
da6613b Jannis Leidel Move events app into own app under the new kuma namespace.
jezdez authored
550 FEEDER_TIMEOUT = 6 # in seconds
8eb19c6 ricky rosario Implemented questions template (bug 565367)
rlr authored
551
c71ddce Adding translate-toolkit to requirements-dev.txt and settings in setting...
James Socol authored
552 def JINJA_CONFIG():
b9c6776 luke crouch Revert "Use Memcache and clean up caching setup."
groovecoder authored
553 import jinja2
554 from django.conf import settings
555 from django.core.cache.backends.memcached import CacheClass as MemcachedCacheClass
5936c3a Jannis Leidel Added new "memcache" caching backend to be used by Jinja2 and constance.
jezdez authored
556 from django.core.cache import get_cache
557 cache = get_cache('memcache')
8508d62 luke crouch fix db/celery race condition
groovecoder authored
558 config = {'extensions': ['jinja2.ext.i18n', 'tower.template.i18n',
b9c6776 luke crouch Revert "Use Memcache and clean up caching setup."
groovecoder authored
559 'jinja2.ext.with_', 'jinja2.ext.loopcontrols',
560 'jinja2.ext.autoescape'],
561 'finalize': lambda x: x if x is not None else ''}
562 if isinstance(cache, MemcachedCacheClass) and not settings.DEBUG:
563 # We're passing the _cache object directly to jinja because
564 # Django can't store binary directly; it enforces unicode on it.
565 # Details: http://jinja.pocoo.org/2/documentation/api#bytecode-cache
566 # and in the errors you get when you try it the other way.
567 bc = jinja2.MemcachedBytecodeCache(cache._cache,
5936c3a Jannis Leidel Added new "memcache" caching backend to be used by Jinja2 and constance.
jezdez authored
568 "%s:j2:" % settings.CACHE_PREFIX)
b9c6776 luke crouch Revert "Use Memcache and clean up caching setup."
groovecoder authored
569 config['cache_size'] = -1 # Never clear the cache
570 config['bytecode_cache'] = bc
c71ddce Adding translate-toolkit to requirements-dev.txt and settings in setting...
James Socol authored
571 return config
572
716a9a0 [bug 576361] _lazy() strings are now extracted, and forums and questions
James Socol authored
573 # Let Tower know about our additional keywords.
574 # DO NOT import an ngettext variant as _lazy.
575 TOWER_KEYWORDS = {
576 '_lazy': None,
577 }
578
c71ddce Adding translate-toolkit to requirements-dev.txt and settings in setting...
James Socol authored
579 # Tells the extract script what files to look for l10n in and what function
580 # handles the extraction. The Tower library expects this.
581 DOMAIN_METHODS = {
582 'messages': [
2a6371a luke crouch bug 663145 make tower ignore a bunch of our un-used kitsune apps
groovecoder authored
583 ('vendor/**', 'ignore'),
823d22f Jannis Leidel fix bug 1057291 - move dashboards app into kuma namespace.
jezdez authored
584 ('kuma/dashboards/**', 'ignore'),
47dadab Jannis Leidel Bug 756533 - Move the used part of the sumo app into kuma.core.
jezdez authored
585 ('kuma/core/**', 'ignore'),
586 ('kuma/**.py',
587 'tower.management.commands.extract.extract_tower_python'),
c71ddce Adding translate-toolkit to requirements-dev.txt and settings in setting...
James Socol authored
588 ('**/templates/**.html',
589 'tower.management.commands.extract.extract_tower_template'),
9cf4d15 luke crouch fix bug 1029071 - send translated welcome emails
groovecoder authored
590 ('**/templates/**.ltxt',
591 'tower.management.commands.extract.extract_tower_template'),
c71ddce Adding translate-toolkit to requirements-dev.txt and settings in setting...
James Socol authored
592 ],
1dd1258 David Walsh Bug fix bug-673513. Initial commit of the mdn-link plugin and dependenc...
darkwing authored
593 'javascript': [
594 # We can't say **.js because that would dive into any libraries.
f5fdec9 David Walsh Removing unneeded CSS and JS files. Moving CSS and JS libs to correspon...
darkwing authored
595 ('media/js/libs/ckeditor/plugins/mdn-link/**.js', 'javascript')
1dd1258 David Walsh Bug fix bug-673513. Initial commit of the mdn-link plugin and dependenc...
darkwing authored
596 ],
c71ddce Adding translate-toolkit to requirements-dev.txt and settings in setting...
James Socol authored
597 }
598
eecf219 Staś Małolepszy [bug 554205] Localizing Javascript
stasm authored
599 # These domains will not be merged into messages.pot and will use separate PO
600 # files. See the following URL for an example of how to set these domains
601 # in DOMAIN_METHODS.
602 # http://github.com/jbalogh/zamboni/blob/d4c64239c24aa2f1e91276909823d1d1b290f0ee/settings.py#L254
603 STANDALONE_DOMAINS = [
604 'javascript',
605 ]
606
c71ddce Adding translate-toolkit to requirements-dev.txt and settings in setting...
James Socol authored
607 # If you have trouble extracting strings with Tower, try setting this
608 # to True
fe7a058 Paul Craciunoiu Fix a bunch of pylint violations and make it shut up about some useless ...
pcraciunoiu authored
609 TOWER_ADD_HEADERS = True
c71ddce Adding translate-toolkit to requirements-dev.txt and settings in setting...
James Socol authored
610
5a79094 Moving css/js to minify.
James Socol authored
611 # Bundles for JS/CSS Minification
c37aa4d David Walsh Update kuma's jingo-minify to allow media query support
darkwing authored
612 JINGO_MINIFY_USE_STATIC = False
b6deed1 David Walsh bug 1084110 - Update paths to stylus and cleancss
darkwing authored
613 CLEANCSS_BIN = '/usr/local/bin/cleancss'
670543b David Walsh Add uncss and uglify to the dev environment
darkwing authored
614 UGLIFY_BIN = '/usr/bin/uglifyjs'
615
5a79094 Moving css/js to minify.
James Socol authored
616 MINIFY_BUNDLES = {
617 'css': {
4cc9725 Les Orchard bug 665081: Find JS/CSS assets not included in MINIFY_BUNDLES and includ...
lmorchard authored
618 'mdn': (
f40d8a0 Akshay Aurora Update path to Font Awesome
iakshay authored
619 'redesign/css/font-awesome.css',
9b188bb Isac Lagerblad While waiting for https://github.com/openjck/kuma/tree/migrate-mdn-scree...
icaaq authored
620 'redesign/css/main.css',
621 'redesign/css/badges.css',
4cc9725 Les Orchard bug 665081: Find JS/CSS assets not included in MINIFY_BUNDLES and includ...
lmorchard authored
622 ),
c550d0b David Walsh Conditionally load jQuery instead of loading everywhere.
darkwing authored
623 'jquery-ui': (
717a880 David Walsh Update jQuery UI paths
darkwing authored
624 'js/libs/jquery-ui-1.10.3.custom/css/ui-lightness/jquery-ui-1.10.3.custom.min.css',
9c26d16 David Walsh Remove home-cooked modal, replace with jQuery UI modals
darkwing authored
625 'css/jqueryui/moz-jquery-plugins.css',
03ad9a6 David Walsh First pass at badge improvements
darkwing authored
626 'redesign/css/jquery-ui-customizations.css',
9c26d16 David Walsh Remove home-cooked modal, replace with jQuery UI modals
darkwing authored
627 ),
4cc9725 Les Orchard bug 665081: Find JS/CSS assets not included in MINIFY_BUNDLES and includ...
lmorchard authored
628 'demostudio': (
3a59528 Stephanie Hobson Bug 1070001: Re-org Stylus - demo studio
stephaniehobson authored
629 'redesign/css/demos.css',
4cc9725 Les Orchard bug 665081: Find JS/CSS assets not included in MINIFY_BUNDLES and includ...
lmorchard authored
630 ),
631 'devderby': (
632 'css/devderby.css',
633 ),
9cd36ca David Walsh Remove old design homepage code
darkwing authored
634 'home': (
635 'redesign/css/home.css',
8a77944 David Walsh fix bug 942396 - Create slider for MDN homepage demos
darkwing authored
636 'js/libs/owl.carousel/owl-carousel/owl.carousel.css',
637 'js/libs/owl.carousel/owl-carousel/owl.theme.css',
9cd36ca David Walsh Remove old design homepage code
darkwing authored
638 ),
5a79094 Moving css/js to minify.
James Socol authored
639 'search': (
4c8effe David Walsh Make the redesign-search the default search
darkwing authored
640 'redesign/css/search.css',
5a79094 Moving css/js to minify.
James Socol authored
641 ),
87a6c40 Jesus Perez fix bug 1030629 - search filter
tx2z authored
642 'search-suggestions': (
643 'redesign/css/search-suggestions.css',
644 ),
9eb84ce ricky rosario Some boilerplate for wiki app.
rlr authored
645 'wiki': (
9b188bb Isac Lagerblad While waiting for https://github.com/openjck/kuma/tree/migrate-mdn-scree...
icaaq authored
646 'redesign/css/wiki.css',
647 'redesign/css/zones.css',
648 'redesign/css/diff.css',
c8abddb David Walsh Combine syntax and wiki CSS files into one
darkwing authored
649
650 'js/libs/prism/themes/prism.css',
651 'js/libs/prism/plugins/line-highlight/prism-line-highlight.css',
652 'js/libs/prism/plugins/ie8/prism-ie8.css',
653 'js/prism-mdn/plugins/line-numbering/prism-line-numbering.css',
654 'js/prism-mdn/components/prism-json.css',
655 'redesign/css/wiki-syntax.css',
9eb84ce ricky rosario Some boilerplate for wiki app.
rlr authored
656 ),
dcb90e5 Stephanie Hobson BUG 1070001: Re-Org Stylus - wiki
stephaniehobson authored
657 'wiki-revisions': (
658 'redesign/css/wiki-revisions.css',
9eb84ce ricky rosario Some boilerplate for wiki app.
rlr authored
659 ),
fcbfbcc John Karahalis Migrate editing rules, update translate page
openjck authored
660 'wiki-edit': (
661 'redesign/css/wiki-edit.css',
662 ),
4b7f377 luke crouch bug 889536 - mdn sphinx theme cleanup
groovecoder authored
663 'sphinx': (
7e40e5e David Walsh Removes the waffle flag checks, also removes legacy files which are no l...
darkwing authored
664 'redesign/css/wiki.css',
665 'redesign/css/sphinx.css',
4b7f377 luke crouch bug 889536 - mdn sphinx theme cleanup
groovecoder authored
666 ),
7213950 ricky rosario New users app for login, logout, and redirect (and more to come). [bug 6...
rlr authored
667 'users': (
549a17c John Karahalis Fix bug 936456: Migrate users.css to users.styl
openjck authored
668 'redesign/css/users.css',
669 ),
dc657b5 Les Orchard Bug 670789 - profile: list interests (for real; the last one was website...
lmorchard authored
670 'tagit': (
0232cc7 David Walsh Move jquery.tagit file to the libs dir
darkwing authored
671 'css/libs/jquery.tagit.css',
dc657b5 Les Orchard Bug 670789 - profile: list interests (for real; the last one was website...
lmorchard authored
672 ),
beeace4 John Karahalis Bug 942224: Migrate promote.css to Stylus
openjck authored
673 'promote': (
7e40e5e David Walsh Removes the waffle flag checks, also removes legacy files which are no l...
darkwing authored
674 'redesign/css/promote.css',
beeace4 John Karahalis Bug 942224: Migrate promote.css to Stylus
openjck authored
675 ),
2bee26a John Karahalis Move error page rules, other error page cleanup
openjck authored
676 'error': (
677 'redesign/css/error.css',
678 ),
679 'error-404': (
680 'redesign/css/error.css',
681 'redesign/css/error-404.css',
a892be3 John Karahalis Bug 942224: Migrate err404.css to Stylus
openjck authored
682 ),
f7e7993 John Karahalis Rename to calendar.styl and remove legacy calendar
openjck authored
683 'calendar': (
684 'redesign/css/calendar.css',
e2ef3a3 John Karahalis Bug 942224: Migrate and redesign Events page
openjck authored
685 ),
7e40e5e David Walsh Removes the waffle flag checks, also removes legacy files which are no l...
darkwing authored
686 'profile': (
f1eb909 David Walsh Minor profile style updates for now
darkwing authored
687 'redesign/css/profile.css',
688 ),
b1635d9 David Walsh Remove 'redesign-' prefix from css and JS
darkwing authored
689 'dashboards': (
d5cb441 David Walsh Migrate dashboards.css to Stylus
darkwing authored
690 'redesign/css/dashboards.css',
691 'redesign/css/diff.css',
692 ),
dadd28e John Karahalis Move newsletter signup, other profile improvements
openjck authored
693 'newsletter': (
694 'redesign/css/newsletter.css',
42b1f8e John Karahalis Improve newsletter signup front-end
openjck authored
695 ),
011e6fa John Karahalis Update, remove old design styles in mdn-screen.css
openjck authored
696 'submission': (
697 'redesign/css/submission.css',
698 ),
699 'user-banned': (
700 'redesign/css/user-banned.css',
701 ),
702 'error-403-alternate': (
703 'redesign/css/error-403-alternate.css',
704 ),
3296e46 Justin Crawford [fix bug 1126583] Add share widget
hoosteeno authored
705 'fellowship': (
706 'redesign/css/fellowship.css',
707 ),
5a79094 Moving css/js to minify.
James Socol authored
708 },
709 'js': {
b1635d9 David Walsh Remove 'redesign-' prefix from css and JS
darkwing authored
710 'main': (
633d79e David Walsh Remove code required to waffle the jQuery upgrade
darkwing authored
711 'js/libs/jquery-2.1.0.js',
20904f4 David Walsh Remove init.js, move required functionality to relevant files
darkwing authored
712 'redesign/js/components.js',
b9e29d8 Isac Lagerblad added clientside error tracking #2171
icaaq authored
713 'redesign/js/analytics.js',
20904f4 David Walsh Remove init.js, move required functionality to relevant files
darkwing authored
714 'redesign/js/main.js',
4bda3e4 John Karahalis Bug 1054558: Notification after successful connect
openjck authored
715 'redesign/js/auth.js',
b872fe2 Les Orchard bug 960835: First steps toward integrating django-badger views
lmorchard authored
716 'redesign/js/badges.js',
20904f4 David Walsh Remove init.js, move required functionality to relevant files
darkwing authored
717 ),
9bb7f44 Jannis Leidel Revert "Removed home.js from list of things to compile."
jezdez authored
718 'home': (
719 'js/libs/owl.carousel/owl-carousel/owl.carousel.js',
720 'redesign/js/home.js'
721 ),
9c26d16 David Walsh Remove home-cooked modal, replace with jQuery UI modals
darkwing authored
722 'popup': (
717a880 David Walsh Update jQuery UI paths
darkwing authored
723 'js/libs/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.min.js',
9c26d16 David Walsh Remove home-cooked modal, replace with jQuery UI modals
darkwing authored
724 'js/modal-control.js',
b8f9565 luke crouch bug 674557 create events bundle to keep events js off other mdn pages
groovecoder authored
725 ),
c05fdd8 Les Orchard Bug 671914 - profile: Topics of expertise
lmorchard authored
726 'profile': (
c637eac David Walsh Move JS out of js/mdn, remove unneeded files
darkwing authored
727 'js/profile.js',
6191e8c David Walsh fix bug 753110 - Prevent profile fields from popluating with prefixes
darkwing authored
728 'js/moz-jquery-plugins.js',
c05fdd8 Les Orchard Bug 671914 - profile: Topics of expertise
lmorchard authored
729 ),
b8f9565 luke crouch bug 674557 create events bundle to keep events js off other mdn pages
groovecoder authored
730 'events': (
bae688d luke crouch bug 674557 use unminified jquery.gmap to avoid minification errors
groovecoder authored
731 'js/libs/jquery.gmap-1.1.0.js',
c637eac David Walsh Move JS out of js/mdn, remove unneeded files
darkwing authored
732 'js/calendar.js',
4cc9725 Les Orchard bug 665081: Find JS/CSS assets not included in MINIFY_BUNDLES and includ...
lmorchard authored
733 ),
734 'demostudio': (
c637eac David Walsh Move JS out of js/mdn, remove unneeded files
darkwing authored
735 'js/libs/jquery.hoverIntent.minified.js',
736 'js/libs/jquery.scrollTo-1.4.2-min.js',
737 'js/demos.js',
717a880 David Walsh Update jQuery UI paths
darkwing authored
738 'js/libs/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.min.js',
9c26d16 David Walsh Remove home-cooked modal, replace with jQuery UI modals
darkwing authored
739 'js/modal-control.js',
4cc9725 Les Orchard bug 665081: Find JS/CSS assets not included in MINIFY_BUNDLES and includ...
lmorchard authored
740 ),
741 'demostudio_devderby_landing': (
c637eac David Walsh Move JS out of js/mdn, remove unneeded files
darkwing authored
742 'js/demos-devderby-landing.js',
4cc9725 Les Orchard bug 665081: Find JS/CSS assets not included in MINIFY_BUNDLES and includ...
lmorchard authored
743 ),
c550d0b David Walsh Conditionally load jQuery instead of loading everywhere.
darkwing authored
744 'jquery-ui': (
a4ea7dc David Walsh Upgrading jQuery UI, cleaning up multiple versions we had been using.
darkwing authored
745 'js/libs/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.min.js',
c550d0b David Walsh Conditionally load jQuery instead of loading everywhere.
darkwing authored
746 'js/moz-jquery-plugins.js',
dc657b5 Les Orchard Bug 670789 - profile: list interests (for real; the last one was website...
lmorchard authored
747 ),
748 'libs/tagit': (
749 'js/libs/tag-it.js',
a56e857 Paul Craciunoiu [bug 584776] Lazy load jqueryui JS.
pcraciunoiu authored
750 ),
5a79094 Moving css/js to minify.
James Socol authored
751 'search': (
4c8effe David Walsh Make the redesign-search the default search
darkwing authored
752 'redesign/js/search.js',
ca59bd5 David Walsh First refactor of the search navigator JS
darkwing authored
753 'redesign/js/search-navigator.js',
5a79094 Moving css/js to minify.
James Socol authored
754 ),
f48f171 Les Orchard Bug 665714 - Kuma: "Save and keep editing", without leaving edit mode
lmorchard authored
755 'framebuster': (
756 'js/framebuster.js',
ebfe768 David Walsh fix bug 821261 - Add JSON highlighter to Prism
darkwing authored
757 ),
758 'syntax-prism': (
545b660 David Walsh Lazyload Prism, package ckeditor
darkwing authored
759 'js/libs/prism/prism.js',
5af90c1 David Walsh Move prism-mdn to JS subdirectory
darkwing authored
760 'js/prism-mdn/components/prism-json.js',
761 'js/prism-mdn/plugins/line-numbering/prism-line-numbering.js',
d4e3d37 David Walsh Maintain the wiki JavaScript scripts, avoid another script load
darkwing authored
762 'js/libs/prism/plugins/line-highlight/prism-line-highlight.js',
ebfe768 David Walsh fix bug 821261 - Add JSON highlighter to Prism
darkwing authored
763 'js/syntax-prism.js',
764 ),
87a6c40 Jesus Perez fix bug 1030629 - search filter
tx2z authored
765 'search-suggestions': (
766 'js/search-suggestions.js',
767 ),
d4e3d37 David Walsh Maintain the wiki JavaScript scripts, avoid another script load
darkwing authored
768 'wiki': (
ca59bd5 David Walsh First refactor of the search navigator JS
darkwing authored
769 'redesign/js/search-navigator.js',
f59148c David Walsh Move stylesheets and javascripts to redesign settings.py
darkwing authored
770 'redesign/js/wiki.js',
771 ),
9ce739a David Walsh Update last loaded scripts to be async for marginally faster onload's
darkwing authored
772 'wiki-edit': (
773 'js/wiki-edit.js',
774 'js/libs/tag-it.js',
775 'js/wiki-tags-edit.js',
776 ),
777 'wiki-move': (
778 'js/wiki-move.js',
779 ),
dadd28e John Karahalis Move newsletter signup, other profile improvements
openjck authored
780 'newsletter': (
781 'redesign/js/newsletter.js',
42b1f8e John Karahalis Improve newsletter signup front-end
openjck authored
782 ),
1221909 Stephanie Hobson Fix Bug 1126583: Fellowship Site
stephaniehobson authored
783 'fellowship': (
784 'redesign/js/fellowship.js',
785 ),
5a79094 Moving css/js to minify.
James Socol authored
786 },
787 }
788
789 #
7b452cb Change Kitsune session behavior (bug 567297)
Joshua Gross authored
790 # Session cookies
791 SESSION_COOKIE_SECURE = True
85212d9 James Socol [fix bug 854165] Clean up some settings.
jsocol authored
792 SESSION_COOKIE_HTTPONLY = True
7b452cb Change Kitsune session behavior (bug 567297)
Joshua Gross authored
793
d7dc4c8 luke crouch bug 634402 mdn settings to fix mdn tests
groovecoder authored
794 # Cookie prefix from PHPBB settings.
795 PHPBB_COOKIE_PREFIX = 'phpbb3_jzxvr'
796
6c20d6c Paul Craciunoiu [596116] Unicode in filenames now supported in upload app. And more.
pcraciunoiu authored
797 # Maximum length of the filename. Forms should use this and raise
798 # ValidationError if the length is exceeded.
799 # @see http://code.djangoproject.com/ticket/9893
800 # Columns are 250 but this leaves 50 chars for the upload_to prefix
801 MAX_FILENAME_LENGTH = 200
802 MAX_FILEPATH_LENGTH = 250
803
814128a luke crouch move from constance to settings
groovecoder authored
804 ATTACHMENT_HOST = 'mdn.mozillademos.org'
805
118c6d3 Paul Craciunoiu [bug 616561] Remove unused settings.
pcraciunoiu authored
806 # Video settings, hard coded here for now.
807 # TODO: figure out a way that doesn't need these values
e664ef5 Paul Craciunoiu [600747] Video hook and render with Flash fallback.
pcraciunoiu authored
808 WIKI_VIDEO_WIDTH = 640
809 WIKI_VIDEO_HEIGHT = 480
a9f19fc Starting the notifications app (bug 563991)
James Socol authored
810
58b33d7 Paul Craciunoiu [582847] Add upload limit (1MB) and enforce it. Also fix up some JS quir...
pcraciunoiu authored
811 IMAGE_MAX_FILESIZE = 1048576 # 1 megabyte, in bytes
8d9a069 Paul Craciunoiu [578520] Delete images and upload with no JS, thumbnail generation and I...
pcraciunoiu authored
812 THUMBNAIL_SIZE = 120 # Thumbnail size, in pixels
813 THUMBNAIL_UPLOAD_PATH = 'uploads/images/thumbnails/'
814 IMAGE_UPLOAD_PATH = 'uploads/images/'
815 # A string listing image mime types to accept, comma separated.
816 # String must not contain double quotes!
817 IMAGE_ALLOWED_MIMETYPES = 'image/jpeg,image/png,image/gif'
5495c6e Paul Craciunoiu [578520] Add preliminary support for uploading images and basic tests. U...
pcraciunoiu authored
818
a9f19fc Starting the notifications app (bug 563991)
James Socol authored
819 # Email
0fedc6d luke crouch bug 662529 fix contentflagging email notifications and add profile admin...
groovecoder authored
820 EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'
821 EMAIL_FILE_PATH = '/tmp/kuma-messages'
3a929b1 Server-side read-only implementation, thanks Jeff! [bug 570284]
James Socol authored
822
a9f19fc Starting the notifications app (bug 563991)
James Socol authored
823 # Celery
fca0843 [bug 578067] Upgrade to celery 2
James Socol authored
824 import djcelery
825 djcelery.setup_loader()
826
2574ded Jannis Leidel Fix bug 1082031 - Updated Celery to 3.x including its dependencies.
jezdez authored
827 BROKER_URL = 'amqp://kuma:kuma@localhost:5672/kuma'
828
79acb5f Notifications app tests
James Socol authored
829 CELERY_ALWAYS_EAGER = True # For tests. Set to False for use.
77760ab Push Celery logs to syslog, for real this time.
James Socol authored
830 CELERY_SEND_TASK_ERROR_EMAILS = True
19f72fa Jannis Leidel Bug 1082031 - Send task events so that we can track their state.
jezdez authored
831 CELERY_SEND_EVENTS = True
2574ded Jannis Leidel Fix bug 1082031 - Updated Celery to 3.x including its dependencies.
jezdez authored
832 CELERY_SEND_TASK_SENT_EVENT = True
a68fb50 Jannis Leidel Bug 1082031 - Track when a task was started.
jezdez authored
833 CELERY_TRACK_STARTED = True
2574ded Jannis Leidel Fix bug 1082031 - Updated Celery to 3.x including its dependencies.
jezdez authored
834
77760ab Push Celery logs to syslog, for real this time.
James Socol authored
835 CELERYD_LOG_LEVEL = logging.INFO
836 CELERYD_CONCURRENCY = 4
2574ded Jannis Leidel Fix bug 1082031 - Updated Celery to 3.x including its dependencies.
jezdez authored
837
838 CELERY_RESULT_BACKEND = 'djcelery.backends.database:DatabaseBackend'
839 CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler'
1fc72d3 ricky rosario Implemented voting for questions / "I have this problem too" (bug 573072...
rlr authored
840
6ef5fac Jannis Leidel Bug 1082031 - Specify which content encoding to allow for data serialisa...
jezdez authored
841 CELERY_ACCEPT_CONTENT = ['pickle']
842
387b0c3 Jannis Leidel Use the native Celery tasks of elasticutils.
jezdez authored
843 CELERY_IMPORTS = (
844 'tidings.events',
845 )
a1d8f69 Les Orchard fix bug 766256: Add rabbitmq & celery to vagrant
lmorchard authored
846
7c24fb4 A KB-rebuild task. [bug 589853]
James Socol authored
847 # Wiki rebuild settings
47dadab Jannis Leidel Bug 756533 - Move the used part of the sumo app into kuma.core.
jezdez authored
848 WIKI_REBUILD_TOKEN = 'kuma:wiki:full-rebuild'
7c24fb4 A KB-rebuild task. [bug 589853]
James Socol authored
849 WIKI_REBUILD_ON_DEMAND = False
850
1fc72d3 ricky rosario Implemented voting for questions / "I have this problem too" (bug 573072...
rlr authored
851 # Anonymous user cookie
47dadab Jannis Leidel Bug 756533 - Move the used part of the sumo app into kuma.core.
jezdez authored
852 ANONYMOUS_COOKIE_NAME = 'KUMA_ANONID'
1fc72d3 ricky rosario Implemented voting for questions / "I have this problem too" (bug 573072...
rlr authored
853 ANONYMOUS_COOKIE_MAX_AGE = 30 * 86400 # Seconds
d17cdd7 ricky rosario Implemented top contributors list (bug 573075)
rlr authored
854
855 # Top contributors cache settings
47dadab Jannis Leidel Bug 756533 - Move the used part of the sumo app into kuma.core.
jezdez authored
856 TOP_CONTRIBUTORS_CACHE_KEY = 'kuma:TopContributors'
d17cdd7 ricky rosario Implemented top contributors list (bug 573075)
rlr authored
857 TOP_CONTRIBUTORS_CACHE_TIMEOUT = 60 * 60 * 12
0298e71 Erik Rose Start wiki app and add skeletal models.
erikrose authored
858
45c4b99 Erik Rose Make firefox_versions and operating_systems delegate to the parent docum...
erikrose authored
859 # Do not change this without also deleting all wiki documents:
0298e71 Erik Rose Start wiki app and add skeletal models.
erikrose authored
860 WIKI_DEFAULT_LANGUAGE = LANGUAGE_CODE
28061e0 Paul Craciunoiu [592670] Media gallery models: a gallery app
pcraciunoiu authored
861
a6f1910 Fred Wenzel Show tweet statistics in the Customer Care sidebar. Bugs 612952, 612966,...
fwenzel authored
862
185b3db luke crouch fix notification email address
groovecoder authored
863 TIDINGS_FROM_ADDRESS = 'notifications@developer.mozilla.org'
f31022b luke crouch bug 859875 - watch page for email notification
groovecoder authored
864 TIDINGS_CONFIRM_ANONYMOUS_WATCHES = True
24a13e5 Paul Craciunoiu [bug 623982, bug 629520] Anonymous watches. Delete watch when delivery f...
pcraciunoiu authored
865
d7dc4c8 luke crouch bug 634402 mdn settings to fix mdn tests
groovecoder authored
866 # recaptcha
867 RECAPTCHA_USE_SSL = False
868 RECAPTCHA_PRIVATE_KEY = 'SET ME IN SETTINGS_LOCAL'
869 RECAPTCHA_PUBLIC_KEY = 'SET ME IN SETTINGS_LOCAL'
870
871 # content flagging
b9f1a32 James Bennett Fix bug 811007: Provide a way for users to flag pages for deletion.
ubernostrum authored
872 DEMO_FLAG_REASONS = (
d7dc4c8 luke crouch bug 634402 mdn settings to fix mdn tests
groovecoder authored
873 ('notworking', _('This demo is not working for me')),
874 ('inappropriate', _('This demo contains inappropriate content')),
875 ('plagarised', _('This demo was not created by the author')),
876 )
877
b9f1a32 James Bennett Fix bug 811007: Provide a way for users to flag pages for deletion.
ubernostrum authored
878 WIKI_FLAG_REASONS = (
879 ('bad', _('This article is spam/inappropriate')),
880 ('unneeded', _('This article is obsolete/unneeded')),
881 ('duplicate', _('This is a duplicate of another article')),
882 )
883
884 FLAG_REASONS = DEMO_FLAG_REASONS + WIKI_FLAG_REASONS
885
d7dc4c8 luke crouch bug 634402 mdn settings to fix mdn tests
groovecoder authored
886 # bit.ly
887 BITLY_API_KEY = "SET ME IN SETTINGS_LOCAL"
888 BITLY_USERNAME = "SET ME IN SETTINGS_LOCAL"
889
eb938d0 Les Orchard bug 685201: throttling queries to Google geocoder API to avoid service d...
lmorchard authored
890 GOOGLE_MAPS_API_KEY = "ABQIAAAAijZqBZcz-rowoXZC1tt9iRT5rHVQFKUGOHoyfP_4KyrflbHKcRTt9kQJVST5oKMRj8vKTQS2b7oNjQ"
891
d7dc4c8 luke crouch bug 634402 mdn settings to fix mdn tests
groovecoder authored
892 # demo studio uploads
893 # Filesystem path where files uploaded for demos will be written
894 DEMO_UPLOADS_ROOT = path('media/uploads/demos')
895 # Base URL from where files uploaded for demos will be linked and served
896 DEMO_UPLOADS_URL = '/media/uploads/demos/'
456420e Les Orchard Update kuma-lib commit used for submodule;
lmorchard authored
897
382142c Les Orchard Convert django-taggit to be covered by South migrations
lmorchard authored
898 # Make sure South stays out of the way during testing
456420e Les Orchard Update kuma-lib commit used for submodule;
lmorchard authored
899 SOUTH_TESTS_MIGRATE = False
900 SKIP_SOUTH_TESTS = True
382142c Les Orchard Convert django-taggit to be covered by South migrations
lmorchard authored
901
902 # Provide migrations for third-party vendor apps
903 # TODO: Move migrations for our apps here, rather than living with the app?
904 SOUTH_MIGRATION_MODULES = {
905 'taggit': 'migrations.south.taggit',
906 }
907
868e94b Les Orchard bug 672238 and bug 683919 - Dynamic config and Dev Derby
lmorchard authored
908 CONSTANCE_BACKEND = 'constance.backends.database.DatabaseBackend'
5936c3a Jannis Leidel Added new "memcache" caching backend to be used by Jinja2 and constance.
jezdez authored
909 # must be an entry in the CACHES setting!
910 CONSTANCE_DATABASE_CACHE_BACKEND = 'memcache'
868e94b Les Orchard bug 672238 and bug 683919 - Dynamic config and Dev Derby
lmorchard authored
911
912 # Settings and defaults controllable by Constance in admin
913 CONSTANCE_CONFIG = dict(
914
edba14e Jannis Leidel fix bug 1095649 - added blacklist override constance value to temporaril...
jezdez authored
915 DEMO_BLACKLIST_OVERRIDE_EXTENSIONS = (
916 'jsgz datagz memgz',
917 'File extensions that override the mimetype blacklist in case of '
918 'an ambigous mimetype such as application/gzip',
919 ),
920
e6246b3 luke crouch fix bug 1092208 - move demo upload limits to constance
groovecoder authored
921 DEMO_MAX_ZIP_FILESIZE = (
922 60 * 1024 * 1024,
923 "Max file size for zips uploaded to demo studio."
924 ),
925
926 DEMO_MAX_FILESIZE_IN_ZIP = (
927 60 * 1024 * 1024,
928 "Max file size for files inside zip uploaded to demo studio."
929 ),
930
868e94b Les Orchard bug 672238 and bug 683919 - Dynamic config and Dev Derby
lmorchard authored
931 DEMOS_DEVDERBY_CURRENT_CHALLENGE_TAG = (
932 "challenge:2011:september",
933 "Dev derby current challenge"
934 ),
935
936 DEMOS_DEVDERBY_PREVIOUS_WINNER_TAG = (
937 "system:challenge:firstplace:2011:august",
938 "Tag used to find most recent winner for dev derby"
939 ),
940
941 DEMOS_DEVDERBY_CHALLENGE_CHOICE_TAGS = (
942 ' '.join([
943 "challenge:2011:september",
944 "challenge:2011:october",
945 "challenge:2011:november",
946 ]),
947 "Dev derby choices displayed on submission form (space-separated tags)"
948 ),
949
950 DEMOS_DEVDERBY_PREVIOUS_CHALLENGE_TAGS = (
951 ' '.join([
1ee7e89 luke crouch fix bug 1045796 - pull down devderby
groovecoder authored
952 "challenge:2013:june",
953 "challenge:2013:may",
954 "challenge:2013:april",
955 "challenge:2013:march",
956 "challenge:2013:february",
957 "challenge:2013:january",
958 "challenge:2012:december",
959 "challenge:2012:november",
960 "challenge:2012:october",
961 "challenge:2012:september",
962 "challenge:2012:august",
963 "challenge:2012:july",
964 "challenge:2012:june",
965 "challenge:2012:may",
966 "challenge:2012:april",
967 "challenge:2012:march",
968 "challenge:2012:february",
969 "challenge:2012:january",
970 "challenge:2011:december",
971 "challenge:2011:november",
972 "challenge:2011:october",
973 "challenge:2011:september",
868e94b Les Orchard bug 672238 and bug 683919 - Dynamic config and Dev Derby
lmorchard authored
974 "challenge:2011:august",
975 "challenge:2011:july",
976 "challenge:2011:june",
977 ]),
978 "Dev derby tags for previous challenges (space-separated tags)"
979 ),
980
e4ad99f David Walsh Allow constance setting for homepage demo
darkwing authored
981 DEMOS_DEVDERBY_HOMEPAGE_FEATURED_DEMO = (
982 0,
983 'The ID of the demo which should be featured on the new homepage structure'
984 ),
985
228ac82 luke crouch fix bug 821255 - retry basket for transient errors
groovecoder authored
986 BASKET_RETRIES = (
987 5,
988 'Number of time to retry basket post before giving up.'
11eec26 luke crouch Fix Bug 715708 move retry wait to constance; fix test weirdness
groovecoder authored
989 ),
228ac82 luke crouch fix bug 821255 - retry basket for transient errors
groovecoder authored
990 BASKET_RETRY_WAIT = (
11eec26 luke crouch Fix Bug 715708 move retry wait to constance; fix test weirdness
groovecoder authored
991 .5,
228ac82 luke crouch fix bug 821255 - retry basket for transient errors
groovecoder authored
992 'How long to wait between basket api request retries. '
11eec26 luke crouch Fix Bug 715708 move retry wait to constance; fix test weirdness
groovecoder authored
993 'We typically multiply this value by the retry number so, e.g., '
994 'the 4th retry waits 4*.5 = 2 seconds.'
573ccfe luke crouch Bug 715708 control over mindtouch post retries
groovecoder authored
995 ),
99775ca luke crouch bug 936123 - put Subscription into UserProfileEdit
groovecoder authored
996 BASKET_API_KEY = (
997 '',
998 'API Key to use for basket requests'
999 ),
238e14a Les Orchard bug 730704: Changes to kuma to use kumascript service
lmorchard authored
1000
c503d6e luke crouch fix bug 918631 - add beta field to profile edit
groovecoder authored
1001 BETA_GROUP_NAME = (
1002 'Beta Testers',
1003 'Name of the django.contrib.auth.models.Group to use as beta testers'
1004 ),
1005
fd34084 Les Orchard bug 766252: Deferred and singleton page rendering
lmorchard authored
1006 KUMA_DOCUMENT_RENDER_TIMEOUT = (
1007 180.0,
1008 'Maximum seconds to wait before considering a rendering in progress or '
1009 'scheduled as failed and allowing another attempt.'
1010 ),
1011 KUMA_DOCUMENT_FORCE_DEFERRED_TIMEOUT = (
1012 10.0,
1013 'Maximum seconds to allow a document to spend rendering during the '
1014 'response cycle before flagging it to be sent to the deferred rendering '
1015 'queue for future renders.'
1016 ),
1017
238e14a Les Orchard bug 730704: Changes to kuma to use kumascript service
lmorchard authored
1018 KUMASCRIPT_TIMEOUT = (
1019 0.0,
1020 'Maximum seconds to wait for a response from the kumascript service. '
1021 'On timeout, the document gets served up as-is and without macro '
1022 'evaluation as an attempt at graceful failure. NOTE: a value of 0 '
1023 'disables kumascript altogether.'
1024 ),
38e8036 Les Orchard bug 730714: Use caching and 304's with kumascript
lmorchard authored
1025 KUMASCRIPT_MAX_AGE = (
1026 600,
1027 'Maximum acceptable age (in seconds) of a cached response from '
1028 'kumascript. Passed along in a Cache-Control: max-age={value} header, '
1029 'which tells kumascript whether or not to serve up a cached response.'
1030 ),
45e3c2d Les Orchard Bug 768492: Quick hack to enable a wiki doc to be treated as wiki CSS
lmorchard authored
1031
1032 KUMA_CUSTOM_CSS_PATH = (
1033 '/en-US/docs/Template:CustomCSS',
1034 'Path to a wiki document whose raw content will be loaded as a CSS '
1035 'stylesheet for the wiki base template. Will also cause the ?raw '
1036 'parameter for this path to send a Content-Type: text/css header. Empty '
1037 'value disables the feature altogether.',
1038 ),
89c6828 luke crouch fix bug 770395 - config for diff context lines
groovecoder authored
1039
2d5f0d6 David Walsh fix bug 854145 - Allow custom CSS for all code samples
darkwing authored
1040 KUMA_CUSTOM_SAMPLE_CSS_PATH = (
1041 '/en-US/docs/Template:CustomSampleCSS',
1042 'Path to a wiki document whose raw content will be loaded as a CSS '
1043 'stylesheet for live sample template. Will also cause the ?raw '
1044 'parameter for this path to send a Content-Type: text/css header. Empty '
1045 'value disables the feature altogether.',
1046 ),
1047
89c6828 luke crouch fix bug 770395 - config for diff context lines
groovecoder authored
1048 DIFF_CONTEXT_LINES = (
1049 0,
f8fed8c luke crouch fix bug 767537 - inline diff in rss feed
groovecoder authored
1050 'Number of lines of context to show in diff display.',
1051 ),
1052
1053 FEED_DIFF_CONTEXT_LINES = (
1054 3,
1055 'Number of lines of context to show in feed diff display.',
89c6828 luke crouch fix bug 770395 - config for diff context lines
groovecoder authored
1056 ),
28b62e1 James Bennett Fix bug 792955: Build file upload filter
ubernostrum authored
1057
1058 WIKI_ATTACHMENT_ALLOWED_TYPES = (
8d3c37d David Walsh fix bug 844321 - Allow PSDs
darkwing authored
1059 'image/gif image/jpeg image/png image/svg+xml text/html image/vnd.adobe.photoshop',
28b62e1 James Bennett Fix bug 792955: Build file upload filter
ubernostrum authored
1060 'Allowed file types for wiki file attachments',
1061 ),
3903d64 Les Orchard bug 797474: Restrict rendering of live code samples to certain hosts
lmorchard authored
1062
7296c86 David Walsh Fix bug 867686 - Allow YouTube embedding, change var name
darkwing authored
1063 KUMA_WIKI_IFRAME_ALLOWED_HOSTS = (
1064 '^https?\:\/\/(developer-local.allizom.org|developer-dev.allizom.org|developer.allizom.org|mozillademos.org|testserver|localhost\:8000|(www.)?youtube.com\/embed\/(\.*))',
1065 'Regex comprised of domain names that are allowed for IFRAME SRCs'
3903d64 Les Orchard bug 797474: Restrict rendering of live code samples to certain hosts
lmorchard authored
1066 ),
bbf04b1 luke crouch fix bug 809115 - add google analytics tracking
groovecoder authored
1067
1068 GOOGLE_ANALYTICS_ACCOUNT = (
52f8c0e luke crouch more vagrant cleanup - mindtouch and phpbb
groovecoder authored
1069 '0',
1070 'Google Analytics Tracking Account Number (0 to disable)',
bbf04b1 luke crouch fix bug 809115 - add google analytics tracking
groovecoder authored
1071 ),
bc5968f Les Orchard fix bug 834296, 834297: Alternate Bleach whitelist switch
lmorchard authored
1072
9f1a04f luke crouch bug 871592 add optimizely macro for templates
groovecoder authored
1073 OPTIMIZELY_PROJECT_ID = (
1074 '',
1075 'The ID value for optimizely Project Code script'
1076 ),
1077
bc5968f Les Orchard fix bug 834296, 834297: Alternate Bleach whitelist switch
lmorchard authored
1078 BLEACH_ALLOWED_TAGS = (
1079 json.dumps([
1080 'a', 'p', 'div',
1081 ]),
1082 "JSON array of tags allowed through Bleach",
1083 ),
1084
1085 BLEACH_ALLOWED_ATTRIBUTES = (
1086 json.dumps({
4d5ec4e David Walsh fix bug 1097573 - Allow 'lang' attributes on all elements
darkwing authored
1087 '*': ['id', 'class', 'style', 'lang'],
bc5968f Les Orchard fix bug 834296, 834297: Alternate Bleach whitelist switch
lmorchard authored
1088 }),
1089 "JSON object associating tags with lists of allowed attributes",
1090 ),
1091
1092 BLEACH_ALLOWED_STYLES = (
1093 json.dumps([
1094 'font-size', 'text-align',
1095 ]),
1096 "JSON array listing CSS styles allowed on tags",
1097 ),
443e0a6 David Walsh fix bug 749313 - Provide static tag suggestions for all modes
darkwing authored
1098
1099 WIKI_DOCUMENT_TAG_SUGGESTIONS = (
1100 json.dumps([
1101 "Accessibility", "AJAX", "API", "Apps",
1102 "Canvas", "CSS", "Device", "DOM", "Events",
1103 "Extensions", "Firefox", "Firefox OS", "Games",
1104 "Gecko", "Graphics", "Internationalization", "History", "HTML", "HTTP", "JavaScript", "Layout",
1105 "Localization", "MDN", "Mobile", "Mozilla",
1106 "Networking", "Persona", "Places", "Plugins", "Protocols",
1107
1108 "Reference", "Tutorial", "Landing",
1109
1110 "junk", "NeedsMarkupWork", "NeedsContent", "NeedsExample",
1111 ]),
1112 "JSON array listing tag suggestions for documents"
1113 ),
553384a luke crouch refactor mvp to external
groovecoder authored
1114
59df529 Jannis Leidel fix bug 870526 - add topic filters based on tags.
jezdez authored
1115 SEARCH_FILTER_TAG_OPTIONS = (
1116 json.dumps([
1117 "Accessibility", "AJAX", "API", "Apps",
1118 "Canvas", "CSS", "Device", "DOM", "Events",
1119 "Extensions", "Firefox", "Firefox OS", "Games",
1120 "Gecko", "Graphics", "Internationalization", "History", "HTML", "HTTP", "JavaScript", "Layout",
1121 "Localization", "MDN", "Mobile", "Mozilla",
1122 "Networking", "Persona", "Places", "Plugins", "Protocols",
1123
1124 "Reference", "Tutorial", "Landing",
1125
1126 "junk", "NeedsMarkupWork", "NeedsContent", "NeedsExample",
1127 ]),
1128 "JSON array of tags that are enabled for search faceting"
1129 ),
1130
98ab6a6 Jannis Leidel Added clean_session task to run periodically.
jezdez authored
1131 SESSION_CLEANUP_CHUNK_SIZE = (
1132 1000,
1133 'Number of expired sessions to cleanup up in one go.',
1134 ),
1135
5232b47 luke crouch fix bug 775485 - welcome email tweaks
groovecoder authored
1136 WELCOME_EMAIL_FROM = (
0e8e623 luke crouch fix bug 775485 - email from Janet
groovecoder authored
1137 "Janet Swisher <no-reply@mozilla.org>",
5232b47 luke crouch fix bug 775485 - welcome email tweaks
groovecoder authored
1138 'Email address from which welcome emails will be sent',
1139 ),
98ab6a6 Jannis Leidel Added clean_session task to run periodically.
jezdez authored
1140
deef702 luke crouch bug 1113252 - send edited notification email for users' first edits
groovecoder authored
1141 EMAIL_LIST_FOR_FIRST_EDITS = (
99931f9 John Karahalis Fix bug 1113252: Use correct spam warning address
openjck authored
1142 "mdn-spam-watch@mozilla.com",
deef702 luke crouch bug 1113252 - send edited notification email for users' first edits
groovecoder authored
1143 "Email address to which emails will be sent for users' first edits",
1144 ),
1145
868e94b Les Orchard bug 672238 and bug 683919 - Dynamic config and Dev Derby
lmorchard authored
1146 )
2c06822 Les Orchard Bug 706526 - browserid: login an existing user with browserid
lmorchard authored
1147
c23dbde luke crouch Bug 706653 change responsys backend lib to basket
groovecoder authored
1148 BASKET_URL = 'https://basket.mozilla.com'
1149 BASKET_APPS_NEWSLETTER = 'app-dev'
238e14a Les Orchard bug 730704: Changes to kuma to use kumascript service
lmorchard authored
1150
1151 KUMASCRIPT_URL_TEMPLATE = 'http://developer.mozilla.org:9080/docs/{path}'
120a3a6 luke crouch fix bug 775147 - add statsd calls
groovecoder authored
1152
5bdd23d Rob Hudson Fix bug 1120526 - Move to using elasticsearch-dsl
robhudson authored
1153 # Elasticsearch related settings.
1154 ES_DEFAULT_NUM_REPLICAS = 1
1155 ES_DEFAULT_NUM_SHARDS = 5
1156 ES_DEFAULT_REFRESH_INTERVAL = '5s'
2a8d335 luke crouch fix bug 647796 - better accept-language logic
groovecoder authored
1157 ES_DISABLED = True
5bdd23d Rob Hudson Fix bug 1120526 - Move to using elasticsearch-dsl
robhudson authored
1158 ES_INDEX_PREFIX = 'mdn'
1159 ES_INDEXES = {'default': 'main_index'}
1160 # Specify the extra timeout in seconds for the indexing ES connection.
1161 ES_INDEXING_TIMEOUT = 30
d830b0d luke crouch explicit default settings.ES_LIVE_INDEX value
groovecoder authored
1162 ES_LIVE_INDEX = False
5bdd23d Rob Hudson Fix bug 1120526 - Move to using elasticsearch-dsl
robhudson authored
1163 ES_URLS = ['localhost:9200']
312a88e James Bennett First draft of Django 1.5 logging configuration.
ubernostrum authored
1164
1165 LOG_LEVEL = logging.WARN
1166 SYSLOG_TAG = 'http_app_kuma'
1167
1168 LOGGING = {
1169 'version': 1,
1170 'disable_existing_loggers': False,
5665b94 Jannis Leidel Bug 756533 - Slightly revert logging changes from 96d0d221bb3d297b4af1bc...
jezdez authored
1171 'filters': {
1172 'require_debug_false': {
1173 '()': 'django.utils.log.RequireDebugFalse',
1174 },
1175 },
6138f54 luke crouch bug 857714 - use settings_log for admin emails
groovecoder authored
1176 'formatters': {
1177 'default': {
1178 'format': '{0}: %(asctime)s %(name)s:%(levelname)s %(message)s: '
1179 '%(pathname)s:%(lineno)s'.format(SYSLOG_TAG),
1180 }
1181 },
312a88e James Bennett First draft of Django 1.5 logging configuration.
ubernostrum authored
1182 'handlers': {
6138f54 luke crouch bug 857714 - use settings_log for admin emails
groovecoder authored
1183 'console': {
312a88e James Bennett First draft of Django 1.5 logging configuration.
ubernostrum authored
1184 'class': 'logging.StreamHandler',
96d0d22 Jannis Leidel Bug 756533 - Simplify the default logging setup to get rid of the Requir...
jezdez authored
1185 'formatter': 'default',
312a88e James Bennett First draft of Django 1.5 logging configuration.
ubernostrum authored
1186 'level': LOG_LEVEL,
1187 },
6138f54 luke crouch bug 857714 - use settings_log for admin emails
groovecoder authored
1188 'mail_admins': {
9a64180 luke crouch change mdn_prod logging to admin emails
groovecoder authored
1189 'class': 'django.utils.log.AdminEmailHandler',
5665b94 Jannis Leidel Bug 756533 - Slightly revert logging changes from 96d0d221bb3d297b4af1bc...
jezdez authored
1190 'filters': ['require_debug_false'],
9a64180 luke crouch change mdn_prod logging to admin emails
groovecoder authored
1191 'level': logging.ERROR,
312a88e James Bennett First draft of Django 1.5 logging configuration.
ubernostrum authored
1192 },
1193 },
1194 'loggers': {
32a6c8b Jannis Leidel Bug 756533 - Define a root kuma logger so that logging doesn't raise a w...
jezdez authored
1195 'kuma': {
6138f54 luke crouch bug 857714 - use settings_log for admin emails
groovecoder authored
1196 'handlers': ['console'],
e426396 James Bennett Fix bug 889051: remove mail_admins from LOGGING config.
ubernostrum authored
1197 'propagate': True,
5665b94 Jannis Leidel Bug 756533 - Slightly revert logging changes from 96d0d221bb3d297b4af1bc...
jezdez authored
1198 'level': logging.ERROR,
6138f54 luke crouch bug 857714 - use settings_log for admin emails
groovecoder authored
1199 },
1200 'django.request': {
e426396 James Bennett Fix bug 889051: remove mail_admins from LOGGING config.
ubernostrum authored
1201 'handlers': ['console'],
1202 'propagate': True,
5665b94 Jannis Leidel Bug 756533 - Slightly revert logging changes from 96d0d221bb3d297b4af1bc...
jezdez authored
1203 'level': logging.ERROR,
312a88e James Bennett First draft of Django 1.5 logging configuration.
ubernostrum authored
1204 },
6c66733 Jannis Leidel Update elasticutils to latest version.
jezdez authored
1205 'elasticsearch': {
1206 'handlers': ['console'],
5665b94 Jannis Leidel Bug 756533 - Slightly revert logging changes from 96d0d221bb3d297b4af1bc...
jezdez authored
1207 'level': logging.ERROR,
6c66733 Jannis Leidel Update elasticutils to latest version.
jezdez authored
1208 },
5bdd23d Rob Hudson Fix bug 1120526 - Move to using elasticsearch-dsl
robhudson authored
1209 'urllib3': {
1210 'handlers': ['console'],
1211 'level': logging.ERROR,
1212 },
312a88e James Bennett First draft of Django 1.5 logging configuration.
ubernostrum authored
1213 },
1214 }
ae34cf7 James Bennett Fix bug 819704.
ubernostrum authored
1215
1216 CSRF_COOKIE_SECURE = True
d63d0f4 James Bennett Fix bug 856124: Use Django's X-Frame-Options middleware.
ubernostrum authored
1217 X_FRAME_OPTIONS = 'DENY'
7e374d0 luke crouch fix bug 795356 - use sentry (errormill.mozilla.org)
groovecoder authored
1218
5280689 Les Orchard bug 768498: Initial steps toward access control for wiki with teams & po...
lmorchard authored
1219 TEAMWORK_BASE_POLICIES = {
1220 'anonymous': (
1221 'wiki.view_document',),
1222 'authenticated': (
1223 'wiki.view_document', 'wiki.add_document', 'wiki.add_revision'),
1224 }
6a8ea90 Les Orchard but 768498: Second part of access control changes
lmorchard authored
1225
1226 GRAPPELLI_ADMIN_TITLE = 'Mozilla Developer Network - Admin'
1227 GRAPPELLI_INDEX_DASHBOARD = 'admin_dashboard.CustomIndexDashboard'
61aed36 Jannis Leidel Refactored search view to be API based and implemented complex filters.
jezdez authored
1228
00f2d65 Jannis Leidel Bug 756533 - Merge devmo app into kuma.core.
jezdez authored
1229 DBGETTEXT_PATH = 'kuma/core/'
61aed36 Jannis Leidel Refactored search view to be API based and implemented complex filters.
jezdez authored
1230 DBGETTEXT_ROOT = 'translations'
b872fe2 Les Orchard bug 960835: First steps toward integrating django-badger views
lmorchard authored
1231
be01cdc Jannis Leidel Added search index admin to be able to easier handle search index change...
jezdez authored
1232
b872fe2 Les Orchard bug 960835: First steps toward integrating django-badger views
lmorchard authored
1233 def get_user_url(user):
47dadab Jannis Leidel Bug 756533 - Move the used part of the sumo app into kuma.core.
jezdez authored
1234 from kuma.core.urlresolvers import reverse
7a41488 Jannis Leidel Fixed templates after app move.
jezdez authored
1235 return reverse('users.profile', args=[user.username])
b872fe2 Les Orchard bug 960835: First steps toward integrating django-badger views
lmorchard authored
1236
1237 ABSOLUTE_URL_OVERRIDES = {
1238 'auth.user': get_user_url
1239 }
1240
1241 OBI_BASE_URL = 'https://backpack.openbadges.org/'
6d70c92 Les Orchard Make Django properly recognize HTTPS via mod_proxy in dev VM
lmorchard authored
1242
1243 # Honor the X-Forwarded-Proto header for environments like local dev VM that
1244 # uses Apache mod_proxy instead of mod_wsgi
1245 SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
1246
77f6eef Jannis Leidel Removed a bunch of django-browserid code.
jezdez authored
1247 # Auth and permissions related constants
421162d Jannis Leidel Use reverse for the login related URL settings.
jezdez authored
1248 LOGIN_URL = reverse_lazy('account_login')
1249 LOGOUT_URL = reverse_lazy('account_logout')
1250 LOGIN_REDIRECT_URL = reverse_lazy('home')
77f6eef Jannis Leidel Removed a bunch of django-browserid code.
jezdez authored
1251
6d70c92 Les Orchard Make Django properly recognize HTTPS via mod_proxy in dev VM
lmorchard authored
1252 # django-allauth configuration
77f6eef Jannis Leidel Removed a bunch of django-browserid code.
jezdez authored
1253 ACCOUNT_LOGOUT_REDIRECT_URL = '/'
6d70c92 Les Orchard Make Django properly recognize HTTPS via mod_proxy in dev VM
lmorchard authored
1254 ACCOUNT_DEFAULT_HTTP_PROTOCOL = 'https'
6df3355 Jannis Leidel Added signup form handling.
jezdez authored
1255 ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
6d70c92 Les Orchard Make Django properly recognize HTTPS via mod_proxy in dev VM
lmorchard authored
1256 ACCOUNT_EMAIL_REQUIRED = True
c5f827b Jannis Leidel WIP
jezdez authored
1257 ACCOUNT_LOGOUT_ON_GET = True
358ec99 Jannis Leidel A few more settings to enable similar behavior like current users app.
jezdez authored
1258 ACCOUNT_USERNAME_MIN_LENGTH = 3
6df3355 Jannis Leidel Added signup form handling.
jezdez authored
1259 ACCOUNT_ADAPTER = 'kuma.users.adapters.KumaAccountAdapter'
b28ca5c Jannis Leidel Make email selection match bug #1036140.
jezdez authored
1260 ACCOUNT_SIGNUP_FORM_CLASS = 'kuma.users.forms.NewsletterForm' # weird but needed
05abdeb luke crouch bug 1057012 - delete unique email constraint
groovecoder authored
1261 ACCOUNT_UNIQUE_EMAIL = False
6df3355 Jannis Leidel Added signup form handling.
jezdez authored
1262
0680a13 Jannis Leidel Disable common signup by default.
jezdez authored
1263 SOCIALACCOUNT_ADAPTER = 'kuma.users.adapters.KumaSocialAccountAdapter'
6df3355 Jannis Leidel Added signup form handling.
jezdez authored
1264 SOCIALACCOUNT_EMAIL_VERIFICATION = 'mandatory'
80cb60d Jannis Leidel Make giving an email address in the social signup account form required.
jezdez authored
1265 SOCIALACCOUNT_EMAIL_REQUIRED = True
358ec99 Jannis Leidel A few more settings to enable similar behavior like current users app.
jezdez authored
1266 SOCIALACCOUNT_AUTO_SIGNUP = False # forces the use of the signup view
6df3355 Jannis Leidel Added signup form handling.
jezdez authored
1267 SOCIALACCOUNT_QUERY_EMAIL = True # used by the custom github provider
61137c3 Jannis Leidel Added branding to Persona popup like ce6e3bde966ac7e2321871c5e63dde3fab2...
jezdez authored
1268 SOCIALACCOUNT_PROVIDERS = {
1269 'persona': {
139ee67 Jannis Leidel Removed port as it's not needed apparently.
jezdez authored
1270 'AUDIENCE': 'https://developer.mozilla.org',
61137c3 Jannis Leidel Added branding to Persona popup like ce6e3bde966ac7e2321871c5e63dde3fab2...
jezdez authored
1271 'REQUEST_PARAMETERS': {
1272 'siteName': 'Mozilla Developer Network',
1273 'siteLogo': '/media/redesign/img/opengraph-logo.png',
1274 }
1275 }
1276 }
17e692b luke crouch fix bug 1136293 - move persona urls to settings.py
groovecoder authored
1277 PERSONA_VERIFIER_URL = 'https://verifier.login.persona.org/verify'
1278 PERSONA_INCLUDE_URL = 'https://login.persona.org/include.js'
5371d54 luke crouch bug 1113260 - add django-banish to ban by IP
groovecoder authored
1279
1280 # django-banish defaults; listing here to be explicit
a9effda luke crouch bug 1126412 - disable banish to un-ban KumaScript
groovecoder authored
1281 BANISH_ENABLED = False # TODO: https://bugzil.la/1126412
5371d54 luke crouch bug 1113260 - add django-banish to ban by IP
groovecoder authored
1282 BANISH_EMPTY_UA = True
cf71cac luke crouch bug 1113260 - use sys.maxint for throttle limit
groovecoder authored
1283 BANISH_ABUSE_THRESHOLD = sys.maxint # TODO: https://bugzil.la/1122658
9f1b7a0 luke crouch bug 1113260 - set banish to use X-Forwarded-For
groovecoder authored
1284 BANISH_USE_HTTP_X_FORWARDED_FOR = True
5371d54 luke crouch bug 1113260 - add django-banish to ban by IP
groovecoder authored
1285 BANISH_MESSAGE = _("This connection has been banned for suspicious activity.")
66b7303 Jannis Leidel Bug 1129115 - Display error page when detecting a Elasticsearch error.
jezdez authored
1286
084dded luke crouch bug 1119532 - add honeypot across all MDN forms
groovecoder authored
1287 HONEYPOT_FIELD_NAME = 'website'
1288
66b7303 Jannis Leidel Bug 1129115 - Display error page when detecting a Elasticsearch error.
jezdez authored
1289 # TODO: Once using DRF more we need to make that exception handler more generic
1290 REST_FRAMEWORK = {
1291 'EXCEPTION_HANDLER': 'kuma.search.utils.search_exception_handler'
1292 }
Something went wrong with that request. Please try again.