2010-01-15 05:10:59 +03:00
|
|
|
# -*- coding: utf-8 -*-
|
2009-10-21 03:29:27 +04:00
|
|
|
# Django settings for zamboni project.
|
|
|
|
|
2009-10-21 06:19:17 +04:00
|
|
|
import os
|
2009-12-16 02:53:21 +03:00
|
|
|
import logging
|
2010-01-14 22:16:28 +03:00
|
|
|
import socket
|
2009-12-16 02:53:21 +03:00
|
|
|
|
2011-07-15 03:17:31 +04:00
|
|
|
from django.utils.functional import lazy
|
2010-10-09 05:29:24 +04:00
|
|
|
|
2012-02-18 03:24:50 +04:00
|
|
|
WAFFLE_TABLE_SUFFIX = 'amo'
|
2012-05-23 13:02:52 +04:00
|
|
|
LOG_TABLE_SUFFIX = ''
|
2012-06-26 03:47:19 +04:00
|
|
|
EVENT_TABLE_SUFFIX = ''
|
2012-02-18 03:24:50 +04:00
|
|
|
|
2011-08-17 03:09:33 +04:00
|
|
|
# jingo-minify settings
|
2011-08-26 20:56:22 +04:00
|
|
|
CACHEBUST_IMGS = True
|
2010-06-17 00:39:01 +04:00
|
|
|
try:
|
|
|
|
# If we have build ids available, we'll grab them here and add them to our
|
|
|
|
# CACHE_PREFIX. This will let us not have to flush memcache during updates
|
|
|
|
# and it will let us preload data into it before a production push.
|
|
|
|
from build import BUILD_ID_CSS, BUILD_ID_JS
|
|
|
|
build_id = "%s%s" % (BUILD_ID_CSS[:2], BUILD_ID_JS[:2])
|
|
|
|
except ImportError:
|
|
|
|
build_id = ""
|
|
|
|
|
2011-12-28 23:10:32 +04:00
|
|
|
# jingo-minify: Style sheet media attribute default
|
|
|
|
CSS_MEDIA_DEFAULT = 'all'
|
|
|
|
|
2012-01-18 21:11:06 +04:00
|
|
|
# Make filepaths relative to the root of zamboni.
|
|
|
|
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
2009-10-21 06:19:17 +04:00
|
|
|
path = lambda *a: os.path.join(ROOT, *a)
|
|
|
|
|
2010-02-13 23:41:54 +03:00
|
|
|
# We need to track this because hudson can't just call its checkout "zamboni".
|
|
|
|
# It puts it in a dir called "workspace". Way to be, hudson.
|
|
|
|
ROOT_PACKAGE = os.path.basename(ROOT)
|
|
|
|
|
2009-10-21 03:29:27 +04:00
|
|
|
DEBUG = True
|
|
|
|
TEMPLATE_DEBUG = DEBUG
|
2009-10-23 02:44:48 +04:00
|
|
|
DEBUG_PROPAGATE_EXCEPTIONS = True
|
2009-10-21 03:29:27 +04:00
|
|
|
|
2011-08-04 22:23:56 +04:00
|
|
|
# need to view JS errors on a remote device? (requires node)
|
|
|
|
# > npm install now
|
|
|
|
# > node media/js/debug/remote_debug_server.node.js
|
|
|
|
# REMOTE_JS_DEBUG = '<yourhost>:37767'
|
|
|
|
# then connect to <yourhost>:8080 to view
|
|
|
|
REMOTE_JS_DEBUG = False
|
|
|
|
|
2011-04-11 21:49:58 +04:00
|
|
|
# LESS CSS OPTIONS (Debug only)
|
|
|
|
LESS_PREPROCESS = False # Compile LESS with Node, rather than client-side JS?
|
|
|
|
LESS_LIVE_REFRESH = False # Refresh the CSS on save?
|
|
|
|
LESS_BIN = 'lessc'
|
|
|
|
|
2009-10-21 03:29:27 +04:00
|
|
|
ADMINS = (
|
|
|
|
# ('Your Name', 'your_email@domain.com'),
|
|
|
|
)
|
|
|
|
MANAGERS = ADMINS
|
|
|
|
|
2010-10-13 01:08:26 +04:00
|
|
|
FLIGTAR = 'amo-admins@mozilla.org'
|
2011-02-15 02:59:45 +03:00
|
|
|
EDITORS_EMAIL = 'amo-editors@mozilla.org'
|
2011-03-18 01:27:20 +03:00
|
|
|
SENIOR_EDITORS_EMAIL = 'amo-admin-reviews@mozilla.org'
|
2011-11-17 02:30:02 +04:00
|
|
|
MARKETPLACE_EMAIL = 'amo-marketplace@mozilla.org'
|
2012-01-06 21:31:27 +04:00
|
|
|
ABUSE_EMAIL = 'marketplace-abuse@mozilla.org'
|
2011-11-30 03:17:14 +04:00
|
|
|
NOBODY_EMAIL = 'nobody@mozilla.org'
|
2010-10-13 01:08:26 +04:00
|
|
|
|
2010-01-08 03:49:46 +03:00
|
|
|
DATABASES = {
|
|
|
|
'default': {
|
2010-01-09 01:29:16 +03:00
|
|
|
'NAME': 'zamboni',
|
2010-01-08 03:49:46 +03:00
|
|
|
'ENGINE': 'django.db.backends.mysql',
|
|
|
|
'HOST': '',
|
|
|
|
'PORT': '',
|
|
|
|
'USER': '',
|
|
|
|
'PASSWORD': '',
|
|
|
|
'OPTIONS': {'init_command': 'SET storage_engine=InnoDB'},
|
2010-03-12 11:41:38 +03:00
|
|
|
'TEST_CHARSET': 'utf8',
|
|
|
|
'TEST_COLLATION': 'utf8_general_ci',
|
2010-01-08 03:49:46 +03:00
|
|
|
},
|
2009-12-16 20:54:54 +03:00
|
|
|
}
|
|
|
|
|
2011-02-25 04:11:56 +03:00
|
|
|
# A database to be used by the services scripts, which does not use Django.
|
|
|
|
# The settings can be copied from DATABASES, but since its not a full Django
|
|
|
|
# database connection, only some values are supported.
|
2011-02-16 04:13:13 +03:00
|
|
|
SERVICES_DATABASE = {
|
|
|
|
'NAME': 'zamboni',
|
|
|
|
'USER': '',
|
|
|
|
'PASSWORD': '',
|
|
|
|
'HOST': '',
|
|
|
|
}
|
|
|
|
|
2010-08-26 03:23:01 +04:00
|
|
|
DATABASE_ROUTERS = ('multidb.PinningMasterSlaveRouter',)
|
2010-01-26 07:49:23 +03:00
|
|
|
|
2012-01-20 22:29:27 +04:00
|
|
|
# For use django-mysql-pool backend.
|
|
|
|
DATABASE_POOL_ARGS = {
|
|
|
|
'max_overflow': 10,
|
2012-01-28 22:56:10 +04:00
|
|
|
'pool_size': 5,
|
|
|
|
'recycle': 300
|
2012-01-20 22:29:27 +04:00
|
|
|
}
|
|
|
|
|
2010-01-08 03:49:46 +03:00
|
|
|
# Put the aliases for your slave databases in this list.
|
|
|
|
SLAVE_DATABASES = []
|
|
|
|
|
2009-10-21 03:29:27 +04:00
|
|
|
# Local time zone for this installation. Choices can be found here:
|
|
|
|
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
|
|
|
# although not all choices may be available on all operating systems.
|
|
|
|
# If running in a Windows environment this must be set to the same as your
|
|
|
|
# system time zone.
|
2009-10-21 06:19:39 +04:00
|
|
|
TIME_ZONE = 'America/Los_Angeles'
|
2009-10-21 03:29:27 +04:00
|
|
|
|
|
|
|
# Language code for this installation. All choices can be found here:
|
|
|
|
# http://www.i18nguy.com/unicode/language-identifiers.html
|
2009-12-03 01:07:36 +03:00
|
|
|
LANGUAGE_CODE = 'en-US'
|
|
|
|
|
2010-01-29 22:32:20 +03:00
|
|
|
# Accepted locales
|
2012-02-29 10:11:34 +04:00
|
|
|
# Note: If you update this list, don't forget to also update the locale
|
|
|
|
# permissions in the database.
|
2010-01-29 22:32:20 +03:00
|
|
|
AMO_LANGUAGES = (
|
2012-05-25 01:08:54 +04:00
|
|
|
'af', 'ar', 'bg', 'ca', 'cs', 'da', 'de', 'el', 'en-US', 'es-ES',
|
2010-06-10 19:56:00 +04:00
|
|
|
'eu', 'fa', 'fi', 'fr', 'ga-IE', 'he', 'hu', 'id', 'it', 'ja', 'ko', 'mn',
|
2011-06-13 23:28:04 +04:00
|
|
|
'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', 'sk', 'sl', 'sq', 'sv-SE',
|
2010-02-17 18:18:32 +03:00
|
|
|
'uk', 'vi', 'zh-CN', 'zh-TW',
|
2010-01-29 22:32:20 +03:00
|
|
|
)
|
|
|
|
|
2012-01-28 22:56:10 +04:00
|
|
|
# Not shown on the site, but .po files exist and these are available on the
|
|
|
|
# L10n dashboard. Generally languages start here and move into AMO_LANGUAGES.
|
2010-02-17 18:18:32 +03:00
|
|
|
HIDDEN_LANGUAGES = ('cy', 'sr', 'sr-Latn', 'tr')
|
|
|
|
|
2011-08-02 02:01:30 +04:00
|
|
|
|
2011-07-15 03:17:31 +04:00
|
|
|
def lazy_langs():
|
|
|
|
from product_details import product_details
|
|
|
|
if not product_details.languages:
|
2011-07-19 04:46:53 +04:00
|
|
|
return {}
|
|
|
|
return dict([(i.lower(), product_details.languages[i]['native'])
|
|
|
|
for i in AMO_LANGUAGES])
|
2011-07-15 03:17:31 +04:00
|
|
|
|
|
|
|
# Where product details are stored see django-mozilla-product-details
|
|
|
|
PROD_DETAILS_DIR = path('lib/product_json')
|
|
|
|
|
2010-01-29 22:32:20 +03:00
|
|
|
# Override Django's built-in with our native names
|
2011-07-19 04:46:53 +04:00
|
|
|
LANGUAGES = lazy(lazy_langs, dict)()
|
2010-02-25 17:57:08 +03:00
|
|
|
RTL_LANGUAGES = ('ar', 'fa', 'fa-IR', 'he')
|
2009-10-21 03:29:27 +04:00
|
|
|
|
2010-02-09 21:51:38 +03:00
|
|
|
LANGUAGE_URL_MAP = dict([(i.lower(), i) for i in AMO_LANGUAGES])
|
2009-10-21 03:29:27 +04:00
|
|
|
|
2011-02-08 04:03:29 +03:00
|
|
|
# Tower / L10n
|
2011-05-25 21:41:36 +04:00
|
|
|
LOCALE_PATHS = (path('locale'),)
|
2010-12-23 01:32:03 +03:00
|
|
|
TEXT_DOMAIN = 'messages'
|
2011-02-08 04:03:29 +03:00
|
|
|
STANDALONE_DOMAINS = [TEXT_DOMAIN, 'javascript']
|
2010-08-03 04:46:58 +04:00
|
|
|
TOWER_KEYWORDS = {
|
|
|
|
'_lazy': None,
|
|
|
|
}
|
2011-05-25 21:41:36 +04:00
|
|
|
TOWER_ADD_HEADERS = True
|
2010-08-03 04:46:58 +04:00
|
|
|
|
2009-10-21 03:29:27 +04:00
|
|
|
# If you set this to False, Django will make some optimizations so as not
|
|
|
|
# to load the internationalization machinery.
|
|
|
|
USE_I18N = True
|
|
|
|
|
2010-03-16 15:04:30 +03:00
|
|
|
# The host currently running the site. Only use this in code for good reason;
|
|
|
|
# the site is designed to run on a cluster and should continue to support that
|
|
|
|
HOSTNAME = socket.gethostname()
|
|
|
|
|
2010-03-18 00:23:48 +03:00
|
|
|
# The front end domain of the site. If you're not running on a cluster this
|
|
|
|
# might be the same as HOSTNAME but don't depend on that. Use this when you
|
|
|
|
# need the real domain.
|
|
|
|
DOMAIN = HOSTNAME
|
|
|
|
|
2010-03-16 15:04:30 +03:00
|
|
|
# Full base URL for your main site including protocol. No trailing slash.
|
|
|
|
# Example: https://addons.mozilla.org
|
2010-03-18 00:23:48 +03:00
|
|
|
SITE_URL = 'http://%s' % DOMAIN
|
2010-03-16 15:04:30 +03:00
|
|
|
|
2011-05-06 20:44:23 +04:00
|
|
|
# Domain of the services site. This is where your API, and in-product pages
|
|
|
|
# live.
|
|
|
|
SERVICES_DOMAIN = 'services.%s' % DOMAIN
|
|
|
|
|
2010-07-23 01:18:37 +04:00
|
|
|
# Full URL to your API service. No trailing slash.
|
|
|
|
# Example: https://services.addons.mozilla.org
|
2011-05-06 20:44:23 +04:00
|
|
|
SERVICES_URL = 'http://%s' % SERVICES_DOMAIN
|
2010-07-23 01:18:37 +04:00
|
|
|
|
2011-07-26 22:09:28 +04:00
|
|
|
# When True, the addon API should include performance data.
|
|
|
|
API_SHOW_PERF_DATA = True
|
|
|
|
|
2011-01-19 03:48:10 +03:00
|
|
|
# The domain of the mobile site.
|
|
|
|
MOBILE_DOMAIN = 'm.%s' % DOMAIN
|
|
|
|
|
|
|
|
# The full url of the mobile site.
|
|
|
|
MOBILE_SITE_URL = 'http://%s' % MOBILE_DOMAIN
|
|
|
|
|
2010-08-27 21:07:16 +04:00
|
|
|
OAUTH_CALLBACK_VIEW = 'api.views.request_token_ready'
|
|
|
|
|
2009-10-21 03:29:27 +04:00
|
|
|
# Absolute path to the directory that holds media.
|
|
|
|
# Example: "/home/media/media.lawrence.com/"
|
2009-10-21 06:19:39 +04:00
|
|
|
MEDIA_ROOT = path('media')
|
2009-10-21 03:29:27 +04:00
|
|
|
|
|
|
|
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
|
|
|
# trailing slash if there is a path component (optional in other cases).
|
|
|
|
# Examples: "http://media.lawrence.com", "http://example.com/media/"
|
2010-12-14 01:36:55 +03:00
|
|
|
MEDIA_URL = '/media/'
|
2009-10-21 03:29:27 +04:00
|
|
|
|
2010-09-22 21:21:21 +04:00
|
|
|
# Absolute path to a temporary storage area
|
|
|
|
TMP_PATH = path('tmp')
|
|
|
|
|
2012-02-01 01:52:36 +04:00
|
|
|
# When True, create a URL root /tmp that serves files in your temp path.
|
|
|
|
# This is useful for development to view upload pics, etc.
|
|
|
|
# NOTE: This only works when DEBUG is also True.
|
|
|
|
SERVE_TMP_PATH = False
|
|
|
|
|
2010-06-10 06:23:22 +04:00
|
|
|
# Absolute path to a writable directory shared by all servers. No trailing
|
2010-09-15 00:22:33 +04:00
|
|
|
# slash. Example: /data/
|
2010-09-22 21:21:21 +04:00
|
|
|
NETAPP_STORAGE = TMP_PATH
|
2010-09-14 21:09:07 +04:00
|
|
|
|
2010-09-15 00:22:33 +04:00
|
|
|
# File path for storing XPI/JAR files (or any files associated with an
|
|
|
|
# add-on). Example: /mnt/netapp_amo/addons.mozilla.org-remora/files
|
2010-09-22 21:21:21 +04:00
|
|
|
ADDONS_PATH = NETAPP_STORAGE + '/addons'
|
2010-09-14 21:09:07 +04:00
|
|
|
|
2011-01-27 05:20:40 +03:00
|
|
|
# Like ADDONS_PATH but protected by the app. Used for storing files that should
|
|
|
|
# not be publicly accessible (like disabled add-ons).
|
|
|
|
GUARDED_ADDONS_PATH = NETAPP_STORAGE + '/guarded-addons'
|
|
|
|
|
2011-08-24 00:57:43 +04:00
|
|
|
# Used for storing watermarked addons for the app.
|
|
|
|
WATERMARKED_ADDONS_PATH = NETAPP_STORAGE + '/watermarked-addons'
|
|
|
|
|
2010-06-17 00:53:24 +04:00
|
|
|
# Absolute path to a writable directory shared by all servers. No trailing
|
|
|
|
# slash.
|
|
|
|
# Example: /data/uploads
|
|
|
|
UPLOADS_PATH = NETAPP_STORAGE + '/uploads'
|
2010-06-10 06:23:22 +04:00
|
|
|
|
2011-01-28 01:53:53 +03:00
|
|
|
# File path for add-on files that get rsynced to mirrors.
|
|
|
|
# /mnt/netapp_amo/addons.mozilla.org-remora/public-staging
|
|
|
|
MIRROR_STAGE_PATH = NETAPP_STORAGE + '/public-staging'
|
|
|
|
|
2009-10-21 03:29:27 +04:00
|
|
|
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
|
|
|
|
# trailing slash.
|
|
|
|
# Examples: "http://foo.com/media/", "/media/".
|
2009-10-21 06:19:39 +04:00
|
|
|
ADMIN_MEDIA_PREFIX = '/admin-media/'
|
2009-10-21 03:29:27 +04:00
|
|
|
|
2010-03-16 15:04:30 +03:00
|
|
|
# paths that don't require an app prefix
|
2012-04-03 21:53:45 +04:00
|
|
|
SUPPORTED_NONAPPS = ('about', 'admin', 'apps', 'blocklist', 'credits',
|
|
|
|
'developer_agreement', 'developer_faq', 'developers',
|
2012-05-04 00:46:47 +04:00
|
|
|
'editors', 'faq', 'google1f3e37b7351799a5.html', 'img',
|
|
|
|
'jsi18n', 'localizers', 'media', 'review_guide',
|
|
|
|
'robots.txt', 'statistics', 'services', 'sunbird')
|
2010-03-16 15:04:30 +03:00
|
|
|
DEFAULT_APP = 'firefox'
|
|
|
|
|
|
|
|
# paths that don't require a locale prefix
|
2012-05-04 00:46:47 +04:00
|
|
|
SUPPORTED_NONLOCALES = ('google1f3e37b7351799a5.html', 'img', 'media',
|
|
|
|
'robots.txt', 'services', 'downloads', 'blocklist')
|
2010-03-16 15:04:30 +03:00
|
|
|
|
2009-10-21 03:29:27 +04:00
|
|
|
# Make this unique, and don't share it with anybody.
|
|
|
|
SECRET_KEY = 'r#%9w^o_80)7f%!_ir5zx$tu3mupw9u%&s!)-_q%gy7i+fhx#)'
|
|
|
|
|
2010-03-16 15:04:30 +03:00
|
|
|
# Templates
|
|
|
|
|
2009-10-21 03:29:27 +04:00
|
|
|
# List of callables that know how to import templates from various sources.
|
|
|
|
TEMPLATE_LOADERS = (
|
2011-10-12 06:48:28 +04:00
|
|
|
#'jingo.Loader',
|
2010-11-17 03:45:22 +03:00
|
|
|
'django.template.loaders.filesystem.Loader',
|
|
|
|
'django.template.loaders.app_directories.Loader',
|
2009-10-21 03:29:27 +04:00
|
|
|
)
|
|
|
|
|
2010-03-16 15:04:30 +03:00
|
|
|
TEMPLATE_CONTEXT_PROCESSORS = (
|
2010-11-17 03:45:22 +03:00
|
|
|
'django.contrib.auth.context_processors.auth',
|
2010-03-16 15:04:30 +03:00
|
|
|
'django.core.context_processors.debug',
|
|
|
|
'django.core.context_processors.media',
|
|
|
|
'django.core.context_processors.request',
|
2011-04-19 00:21:28 +04:00
|
|
|
'session_csrf.context_processor',
|
2010-03-16 15:04:30 +03:00
|
|
|
|
|
|
|
'django.contrib.messages.context_processors.messages',
|
|
|
|
|
|
|
|
'amo.context_processors.app',
|
|
|
|
'amo.context_processors.i18n',
|
|
|
|
'amo.context_processors.global_settings',
|
2011-05-03 20:48:25 +04:00
|
|
|
'amo.context_processors.static_url',
|
2010-05-14 04:26:15 +04:00
|
|
|
'jingo_minify.helpers.build_ids',
|
2010-03-16 15:04:30 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
TEMPLATE_DIRS = (
|
|
|
|
path('templates'),
|
|
|
|
)
|
|
|
|
|
2010-04-28 20:02:41 +04:00
|
|
|
|
2010-03-16 15:04:30 +03:00
|
|
|
def JINJA_CONFIG():
|
|
|
|
import jinja2
|
|
|
|
from django.conf import settings
|
2011-03-01 07:55:21 +03:00
|
|
|
from django.core.cache import cache
|
2010-06-26 00:43:34 +04:00
|
|
|
config = {'extensions': ['tower.template.i18n', 'amo.ext.cache',
|
2010-07-16 03:46:37 +04:00
|
|
|
'jinja2.ext.do',
|
2010-03-16 15:04:30 +03:00
|
|
|
'jinja2.ext.with_', 'jinja2.ext.loopcontrols'],
|
|
|
|
'finalize': lambda x: x if x is not None else ''}
|
2011-03-01 08:21:22 +03:00
|
|
|
if False and not settings.DEBUG:
|
2010-03-16 15:04:30 +03:00
|
|
|
# We're passing the _cache object directly to jinja because
|
|
|
|
# Django can't store binary directly; it enforces unicode on it.
|
|
|
|
# Details: http://jinja.pocoo.org/2/documentation/api#bytecode-cache
|
|
|
|
# and in the errors you get when you try it the other way.
|
|
|
|
bc = jinja2.MemcachedBytecodeCache(cache._cache,
|
|
|
|
"%sj2:" % settings.CACHE_PREFIX)
|
|
|
|
config['cache_size'] = -1 # Never clear the cache
|
|
|
|
config['bytecode_cache'] = bc
|
|
|
|
return config
|
|
|
|
|
|
|
|
|
2009-10-21 03:29:27 +04:00
|
|
|
MIDDLEWARE_CLASSES = (
|
2009-12-30 22:01:59 +03:00
|
|
|
# AMO URL middleware comes first so everyone else sees nice URLs.
|
2012-01-05 03:12:53 +04:00
|
|
|
'django_statsd.middleware.GraphiteRequestTimingMiddleware',
|
|
|
|
'django_statsd.middleware.GraphiteMiddleware',
|
2009-12-30 22:01:59 +03:00
|
|
|
'amo.middleware.LocaleAndAppURLMiddleware',
|
2011-01-19 03:48:10 +03:00
|
|
|
# Mobile detection should happen in Zeus.
|
2011-02-04 01:10:03 +03:00
|
|
|
'mobility.middleware.DetectMobileMiddleware',
|
|
|
|
'mobility.middleware.XMobileMiddleware',
|
2011-09-09 00:11:14 +04:00
|
|
|
# Disabled until ready:
|
|
|
|
# 'amo.middleware.LazyPjaxMiddleware',
|
2010-05-13 02:27:32 +04:00
|
|
|
'amo.middleware.RemoveSlashMiddleware',
|
2009-12-30 22:01:59 +03:00
|
|
|
|
2010-05-11 22:09:32 +04:00
|
|
|
# Munging REMOTE_ADDR must come before ThreadRequest.
|
|
|
|
'commonware.middleware.SetRemoteAddrFromForwardedFor',
|
2010-09-14 03:01:12 +04:00
|
|
|
|
2010-09-23 03:00:36 +04:00
|
|
|
'commonware.middleware.FrameOptionsHeader',
|
2011-05-18 09:21:38 +04:00
|
|
|
'commonware.middleware.StrictTransportMiddleware',
|
2010-08-26 03:23:01 +04:00
|
|
|
'multidb.middleware.PinningRouterMiddleware',
|
2012-02-09 21:36:53 +04:00
|
|
|
'waffle.middleware.WaffleMiddleware',
|
2010-05-11 22:09:32 +04:00
|
|
|
|
2010-10-01 21:11:07 +04:00
|
|
|
'csp.middleware.CSPMiddleware',
|
2010-09-23 00:42:49 +04:00
|
|
|
|
2010-05-25 00:19:55 +04:00
|
|
|
'amo.middleware.CommonMiddleware',
|
2010-03-24 23:54:54 +03:00
|
|
|
'amo.middleware.NoVarySessionMiddleware',
|
2010-02-05 02:14:16 +03:00
|
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
2011-02-23 03:53:24 +03:00
|
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
2011-04-27 22:20:40 +04:00
|
|
|
'commonware.log.ThreadRequestMiddleware',
|
2011-04-19 00:21:28 +04:00
|
|
|
'session_csrf.CsrfMiddleware',
|
2009-12-14 23:34:11 +03:00
|
|
|
|
2010-01-29 08:00:13 +03:00
|
|
|
# This should come after authentication middleware
|
2010-01-12 03:40:55 +03:00
|
|
|
'access.middleware.ACLMiddleware',
|
2010-09-11 02:28:57 +04:00
|
|
|
|
2011-08-04 01:36:37 +04:00
|
|
|
'commonware.middleware.ScrubRequestOnException',
|
2009-10-21 03:29:27 +04:00
|
|
|
)
|
|
|
|
|
2010-03-16 15:04:30 +03:00
|
|
|
# Auth
|
2010-01-13 04:26:20 +03:00
|
|
|
AUTHENTICATION_BACKENDS = (
|
2011-07-30 01:28:20 +04:00
|
|
|
'django_browserid.auth.BrowserIDBackend',
|
2010-01-13 04:26:20 +03:00
|
|
|
'users.backends.AmoUserBackend',
|
|
|
|
'cake.backends.SessionBackend',
|
|
|
|
)
|
2010-03-16 15:04:30 +03:00
|
|
|
AUTH_PROFILE_MODULE = 'users.UserProfile'
|
2009-10-22 01:48:38 +04:00
|
|
|
|
2012-01-18 21:11:06 +04:00
|
|
|
# Override this in the site settings.
|
|
|
|
ROOT_URLCONF = 'lib.urls_base'
|
2009-10-21 03:29:27 +04:00
|
|
|
|
|
|
|
INSTALLED_APPS = (
|
2010-04-21 07:08:27 +04:00
|
|
|
'amo', # amo comes first so it always takes precedence.
|
2011-08-04 03:17:44 +04:00
|
|
|
'abuse',
|
2010-01-04 00:05:32 +03:00
|
|
|
'access',
|
2009-10-23 02:42:48 +04:00
|
|
|
'addons',
|
2010-02-06 02:38:38 +03:00
|
|
|
'api',
|
2010-01-04 22:04:22 +03:00
|
|
|
'applications',
|
2010-01-16 05:52:56 +03:00
|
|
|
'bandwagon',
|
2010-01-27 01:23:25 +03:00
|
|
|
'blocklist',
|
2010-02-06 01:06:16 +03:00
|
|
|
'browse',
|
2011-04-11 21:44:52 +04:00
|
|
|
'compat',
|
2010-02-18 00:14:50 +03:00
|
|
|
'cronjobs',
|
2010-09-23 00:42:49 +04:00
|
|
|
'csp',
|
2010-01-05 23:12:04 +03:00
|
|
|
'devhub',
|
2010-04-21 07:08:27 +04:00
|
|
|
'discovery',
|
2010-01-05 01:23:05 +03:00
|
|
|
'editors',
|
2010-09-15 23:11:05 +04:00
|
|
|
'extras',
|
2010-01-16 01:52:52 +03:00
|
|
|
'files',
|
2010-05-14 04:26:15 +04:00
|
|
|
'jingo_minify',
|
2011-08-10 16:34:58 +04:00
|
|
|
'market',
|
2010-02-17 18:18:32 +03:00
|
|
|
'localizers',
|
2010-03-29 22:02:34 +04:00
|
|
|
'pages',
|
2010-11-19 02:19:07 +03:00
|
|
|
'perf',
|
2011-07-15 03:17:31 +04:00
|
|
|
'product_details',
|
2009-10-23 02:42:48 +04:00
|
|
|
'reviews',
|
2010-01-23 03:52:41 +03:00
|
|
|
'search',
|
2010-03-09 14:52:41 +03:00
|
|
|
'sharing',
|
2010-02-02 05:35:40 +03:00
|
|
|
'stats',
|
2010-01-05 04:46:55 +03:00
|
|
|
'tags',
|
2010-04-14 09:15:16 +04:00
|
|
|
'tower', # for ./manage.py extract
|
2009-12-11 00:21:51 +03:00
|
|
|
'translations',
|
2009-10-23 02:42:48 +04:00
|
|
|
'users',
|
|
|
|
'versions',
|
2012-03-14 05:40:42 +04:00
|
|
|
'mkt.webapps',
|
2010-04-21 07:08:27 +04:00
|
|
|
'zadmin',
|
2009-12-14 23:34:11 +03:00
|
|
|
'cake',
|
2010-08-27 21:07:16 +04:00
|
|
|
|
|
|
|
# Third party apps
|
2010-08-17 01:30:46 +04:00
|
|
|
'djcelery',
|
2011-08-03 01:37:31 +04:00
|
|
|
'django_extensions',
|
2009-12-05 01:55:29 +03:00
|
|
|
'django_nose',
|
2012-04-20 09:38:54 +04:00
|
|
|
'raven.contrib.django',
|
2011-04-12 02:55:02 +04:00
|
|
|
'gunicorn',
|
2010-08-27 21:07:16 +04:00
|
|
|
'piston',
|
2011-04-13 19:42:52 +04:00
|
|
|
'waffle',
|
2009-12-31 01:26:56 +03:00
|
|
|
|
2010-08-27 21:07:16 +04:00
|
|
|
# Django contrib apps
|
2009-12-31 01:26:56 +03:00
|
|
|
'django.contrib.admin',
|
2009-10-21 03:29:27 +04:00
|
|
|
'django.contrib.auth',
|
|
|
|
'django.contrib.contenttypes',
|
2010-02-05 02:14:16 +03:00
|
|
|
'django.contrib.messages',
|
2009-10-21 03:29:27 +04:00
|
|
|
'django.contrib.sessions',
|
2011-07-30 01:28:20 +04:00
|
|
|
|
|
|
|
# Has to load after auth
|
|
|
|
'django_browserid',
|
2012-01-05 03:12:53 +04:00
|
|
|
'django_statsd',
|
2011-09-17 00:04:22 +04:00
|
|
|
'radagast',
|
2009-10-21 03:29:27 +04:00
|
|
|
)
|
2009-12-05 01:55:29 +03:00
|
|
|
|
2010-01-26 02:53:17 +03:00
|
|
|
# These apps will be removed from INSTALLED_APPS in a production environment.
|
|
|
|
DEV_APPS = (
|
|
|
|
'django_nose',
|
|
|
|
)
|
|
|
|
|
2010-03-16 15:04:30 +03:00
|
|
|
# Tests
|
2010-02-01 22:24:26 +03:00
|
|
|
TEST_RUNNER = 'test_utils.runner.RadicalTestSuiteRunner'
|
2011-09-16 21:11:28 +04:00
|
|
|
NOSE_ARGS = [
|
|
|
|
'--with-fixture-bundling',
|
2012-02-15 01:22:46 +04:00
|
|
|
'--exclude=mkt/*',
|
2011-09-16 21:11:28 +04:00
|
|
|
]
|
2009-12-16 02:53:21 +03:00
|
|
|
|
2010-03-16 15:04:30 +03:00
|
|
|
# If you want to run Selenium tests, you'll need to have a server running.
|
|
|
|
# Then give this a dictionary of settings. Something like:
|
|
|
|
# 'HOST': 'localhost',
|
|
|
|
# 'PORT': 4444,
|
|
|
|
# 'BROWSER': '*firefox', # Alternative: *safari
|
|
|
|
SELENIUM_CONFIG = {}
|
2010-03-09 00:41:36 +03:00
|
|
|
|
|
|
|
# Tells the extract script what files to look for l10n in and what function
|
|
|
|
# handles the extraction. The Tower library expects this.
|
|
|
|
DOMAIN_METHODS = {
|
|
|
|
'messages': [
|
|
|
|
('apps/**.py',
|
2010-04-14 09:15:16 +04:00
|
|
|
'tower.management.commands.extract.extract_tower_python'),
|
2011-02-06 13:25:11 +03:00
|
|
|
('apps/**/templates/**.html',
|
|
|
|
'tower.management.commands.extract.extract_tower_template'),
|
|
|
|
('templates/**.html',
|
2010-04-14 09:15:16 +04:00
|
|
|
'tower.management.commands.extract.extract_tower_template'),
|
2012-05-24 02:45:44 +04:00
|
|
|
('mkt/**.py',
|
|
|
|
'tower.management.commands.extract.extract_tower_python'),
|
|
|
|
('mkt/**/templates/**.html',
|
|
|
|
'tower.management.commands.extract.extract_tower_template'),
|
|
|
|
('mkt/templates/**.html',
|
|
|
|
'tower.management.commands.extract.extract_tower_template'),
|
2010-03-09 00:41:36 +03:00
|
|
|
],
|
|
|
|
'lhtml': [
|
|
|
|
('**/templates/**.lhtml',
|
2010-04-14 09:15:16 +04:00
|
|
|
'tower.management.commands.extract.extract_tower_template'),
|
2010-03-09 00:41:36 +03:00
|
|
|
],
|
|
|
|
'javascript': [
|
|
|
|
# We can't say **.js because that would dive into mochikit and timeplot
|
|
|
|
# and all the other baggage we're carrying. Timeplot, in particular,
|
|
|
|
# crashes the extractor with bad unicode data.
|
|
|
|
('media/js/*.js', 'javascript'),
|
|
|
|
('media/js/amo2009/**.js', 'javascript'),
|
2011-11-04 20:14:50 +04:00
|
|
|
('media/js/impala/**.js', 'javascript'),
|
2010-03-09 00:41:36 +03:00
|
|
|
('media/js/zamboni/**.js', 'javascript'),
|
2012-05-24 02:45:44 +04:00
|
|
|
('media/js/mkt/**.js', 'javascript'),
|
2010-03-09 00:41:36 +03:00
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2010-03-09 19:55:16 +03:00
|
|
|
# Bundles is a dictionary of two dictionaries, css and js, which list css files
|
|
|
|
# and js files that can be bundled together by the minify app.
|
|
|
|
MINIFY_BUNDLES = {
|
|
|
|
'css': {
|
|
|
|
# CSS files common to the entire site.
|
2010-12-14 20:30:53 +03:00
|
|
|
'zamboni/css': (
|
2010-12-14 01:36:55 +03:00
|
|
|
'css/legacy/main.css',
|
|
|
|
'css/legacy/main-mozilla.css',
|
|
|
|
'css/legacy/jquery-lightbox.css',
|
|
|
|
'css/legacy/autocomplete.css',
|
2010-03-20 01:48:15 +03:00
|
|
|
'css/zamboni/zamboni.css',
|
2011-01-24 11:30:08 +03:00
|
|
|
'css/global/headerfooter.css',
|
2010-04-16 21:55:20 +04:00
|
|
|
'css/zamboni/tags.css',
|
|
|
|
'css/zamboni/tabs.css',
|
2011-08-31 04:28:36 +04:00
|
|
|
'css/impala/formset.less',
|
2011-10-19 01:41:56 +04:00
|
|
|
'css/impala/suggestions.less',
|
2011-10-22 03:49:40 +04:00
|
|
|
'css/impala/header.less',
|
|
|
|
'css/impala/moz-tab.css',
|
2011-11-19 11:39:54 +04:00
|
|
|
'css/impala/footer.less',
|
2011-10-22 03:49:40 +04:00
|
|
|
'css/impala/faux-zamboni.less',
|
2012-03-02 05:29:09 +04:00
|
|
|
'css/impala/collection-stats.less',
|
2010-03-20 01:48:15 +03:00
|
|
|
),
|
2011-04-19 00:03:52 +04:00
|
|
|
'zamboni/impala': (
|
|
|
|
'css/impala/base.css',
|
2011-05-05 02:01:16 +04:00
|
|
|
'css/legacy/jquery-lightbox.css',
|
2011-04-19 00:03:52 +04:00
|
|
|
'css/impala/site.less',
|
|
|
|
'css/impala/typography.less',
|
|
|
|
'css/global/headerfooter.css',
|
2011-06-29 21:16:56 +04:00
|
|
|
'css/impala/forms.less',
|
2012-03-29 00:39:34 +04:00
|
|
|
'css/common/invisible-upload.less',
|
2011-05-05 02:01:16 +04:00
|
|
|
'css/impala/header.less',
|
|
|
|
'css/impala/footer.less',
|
2011-04-19 00:03:52 +04:00
|
|
|
'css/impala/moz-tab.css',
|
|
|
|
'css/impala/hovercards.less',
|
|
|
|
'css/impala/toplist.less',
|
2011-04-27 02:58:20 +04:00
|
|
|
'css/impala/carousel.less',
|
|
|
|
'css/impala/reviews.less',
|
2011-05-05 02:01:16 +04:00
|
|
|
'css/impala/buttons.less',
|
2011-05-18 12:07:05 +04:00
|
|
|
'css/impala/promos.less',
|
2011-05-05 02:01:16 +04:00
|
|
|
'css/impala/addon_details.less',
|
2011-07-29 22:53:01 +04:00
|
|
|
'css/impala/policy.less',
|
2011-05-25 05:11:10 +04:00
|
|
|
'css/impala/expando.less',
|
|
|
|
'css/impala/popups.less',
|
2011-07-19 02:49:15 +04:00
|
|
|
'css/impala/l10n.less',
|
2011-05-26 05:10:20 +04:00
|
|
|
'css/impala/contributions.less',
|
|
|
|
'css/impala/lightbox.less',
|
2011-07-19 21:47:01 +04:00
|
|
|
'css/impala/prose.less',
|
2011-05-28 05:30:41 +04:00
|
|
|
'css/impala/sharing.less',
|
2011-06-10 01:46:43 +04:00
|
|
|
'css/impala/abuse.less',
|
2011-07-13 22:18:57 +04:00
|
|
|
'css/impala/paginator.less',
|
|
|
|
'css/impala/listing.less',
|
2011-09-29 00:34:40 +04:00
|
|
|
'css/impala/versions.less',
|
2011-07-21 02:34:09 +04:00
|
|
|
'css/impala/users.less',
|
2011-07-15 01:50:10 +04:00
|
|
|
'css/impala/collections.less',
|
2011-07-26 01:44:12 +04:00
|
|
|
'css/impala/tooltips.less',
|
2011-07-21 11:58:29 +04:00
|
|
|
'css/impala/search.less',
|
2011-10-03 12:07:30 +04:00
|
|
|
'css/impala/suggestions.less',
|
2011-08-09 04:13:03 +04:00
|
|
|
'css/impala/colorpicker.less',
|
|
|
|
'css/impala/personas.less',
|
2011-09-07 01:00:38 +04:00
|
|
|
'css/impala/login.less',
|
2011-09-07 03:18:28 +04:00
|
|
|
'css/impala/dictionaries.less',
|
2011-09-09 03:25:01 +04:00
|
|
|
'css/impala/apps.less',
|
2011-08-31 04:28:36 +04:00
|
|
|
'css/impala/formset.less',
|
2011-10-26 01:04:47 +04:00
|
|
|
'css/impala/tables.less',
|
|
|
|
'css/impala/compat.less',
|
2012-01-11 23:32:24 +04:00
|
|
|
'css/impala/localizers.less',
|
2011-04-19 00:03:52 +04:00
|
|
|
),
|
2011-10-11 02:22:41 +04:00
|
|
|
'zamboni/stats': (
|
|
|
|
'css/impala/stats.less',
|
|
|
|
),
|
2010-04-21 07:08:27 +04:00
|
|
|
'zamboni/discovery-pane': (
|
|
|
|
'css/zamboni/discovery-pane.css',
|
2011-07-27 02:10:30 +04:00
|
|
|
'css/impala/promos.less',
|
2010-12-14 01:36:55 +03:00
|
|
|
'css/legacy/jquery-lightbox.css',
|
2010-04-28 20:02:41 +04:00
|
|
|
),
|
2010-09-15 05:05:56 +04:00
|
|
|
'zamboni/devhub': (
|
2011-08-31 01:55:23 +04:00
|
|
|
'css/impala/tooltips.less',
|
2010-09-15 05:05:56 +04:00
|
|
|
'css/zamboni/developers.css',
|
2011-05-17 03:00:48 +04:00
|
|
|
'css/zamboni/docs.less',
|
2011-08-29 22:55:39 +04:00
|
|
|
'css/impala/developers.less',
|
2011-12-01 06:43:17 +04:00
|
|
|
'css/devhub/packager.less',
|
|
|
|
'css/devhub/listing.less',
|
|
|
|
'css/devhub/popups.less',
|
|
|
|
'css/devhub/compat.less',
|
2011-08-31 04:28:36 +04:00
|
|
|
'css/impala/formset.less',
|
2011-11-30 04:52:32 +04:00
|
|
|
'css/devhub/forms.less',
|
2012-03-29 00:39:34 +04:00
|
|
|
'css/common/invisible-upload.less',
|
2011-12-15 06:36:43 +04:00
|
|
|
'css/devhub/submission.less',
|
2012-02-03 04:35:07 +04:00
|
|
|
'css/devhub/refunds.less',
|
|
|
|
'css/devhub/buttons.less',
|
2012-02-08 22:51:53 +04:00
|
|
|
'css/devhub/in-app-config.less',
|
2010-09-15 05:05:56 +04:00
|
|
|
),
|
2011-06-07 02:44:41 +04:00
|
|
|
'zamboni/devhub_impala': (
|
|
|
|
'css/impala/developers.less',
|
2011-12-01 06:43:17 +04:00
|
|
|
'css/devhub/listing.less',
|
|
|
|
'css/devhub/popups.less',
|
|
|
|
'css/devhub/compat.less',
|
|
|
|
'css/devhub/dashboard.less',
|
2011-11-30 04:52:32 +04:00
|
|
|
'css/devhub/forms.less',
|
2012-03-29 00:39:34 +04:00
|
|
|
'css/common/invisible-upload.less',
|
2011-12-15 06:36:43 +04:00
|
|
|
'css/devhub/submission.less',
|
2011-12-19 08:15:55 +04:00
|
|
|
'css/devhub/search.less',
|
2012-02-03 04:35:07 +04:00
|
|
|
'css/devhub/refunds.less',
|
2011-06-07 02:44:41 +04:00
|
|
|
),
|
2011-01-15 02:41:22 +03:00
|
|
|
'zamboni/editors': (
|
|
|
|
'css/zamboni/editors.css',
|
|
|
|
),
|
2011-03-08 03:13:29 +03:00
|
|
|
'zamboni/files': (
|
2011-05-17 20:01:08 +04:00
|
|
|
'css/lib/syntaxhighlighter/shCoreDefault.css',
|
2011-03-08 03:13:29 +03:00
|
|
|
'css/zamboni/files.css',
|
|
|
|
),
|
2011-01-27 22:38:48 +03:00
|
|
|
'zamboni/mobile': (
|
|
|
|
'css/zamboni/mobile.css',
|
2011-11-22 22:05:56 +04:00
|
|
|
'css/mobile/typography.less',
|
2011-12-01 06:43:17 +04:00
|
|
|
'css/mobile/forms.less',
|
2011-11-18 22:43:07 +04:00
|
|
|
'css/mobile/header.less',
|
2011-11-23 10:18:44 +04:00
|
|
|
'css/mobile/search.less',
|
2011-11-16 00:52:36 +04:00
|
|
|
'css/mobile/listing.less',
|
2011-11-20 03:10:59 +04:00
|
|
|
'css/mobile/footer.less',
|
2011-01-27 22:38:48 +03:00
|
|
|
),
|
2011-08-09 14:33:41 +04:00
|
|
|
'zamboni/admin': (
|
|
|
|
'css/zamboni/admin-django.css',
|
|
|
|
'css/zamboni/admin-mozilla.css',
|
|
|
|
'css/zamboni/admin_features.css'
|
|
|
|
),
|
2010-03-09 19:55:16 +03:00
|
|
|
},
|
|
|
|
'js': {
|
2011-11-04 20:41:28 +04:00
|
|
|
# JS files common to the entire site (pre-impala).
|
2010-03-09 19:55:16 +03:00
|
|
|
'common': (
|
2011-10-29 00:53:43 +04:00
|
|
|
'js/lib/jquery-1.6.4.js',
|
2011-09-21 01:59:42 +04:00
|
|
|
'js/lib/underscore.js',
|
2011-02-17 04:01:52 +03:00
|
|
|
'js/zamboni/browser.js',
|
2010-03-09 22:54:33 +03:00
|
|
|
'js/amo2009/addons.js',
|
|
|
|
'js/zamboni/init.js',
|
2011-10-18 01:06:22 +04:00
|
|
|
'js/impala/capabilities.js',
|
2012-03-22 04:31:00 +04:00
|
|
|
'js/lib/format.js',
|
2011-08-18 22:04:55 +04:00
|
|
|
'js/lib/jquery.cookie.js',
|
|
|
|
'js/zamboni/storage.js',
|
2011-11-15 02:29:37 +04:00
|
|
|
'js/zamboni/apps.js',
|
2010-03-09 22:50:01 +03:00
|
|
|
'js/zamboni/buttons.js',
|
2010-04-10 08:02:46 +04:00
|
|
|
'js/zamboni/tabs.js',
|
2012-03-22 05:35:08 +04:00
|
|
|
'js/common/keys.js',
|
2010-03-09 22:54:33 +03:00
|
|
|
|
2011-09-21 01:59:42 +04:00
|
|
|
# jQuery UI
|
|
|
|
'js/lib/jquery-ui/jquery.ui.core.js',
|
|
|
|
'js/lib/jquery-ui/jquery.ui.position.js',
|
|
|
|
'js/lib/jquery-ui/jquery.ui.widget.js',
|
2011-09-22 21:57:48 +04:00
|
|
|
'js/lib/jquery-ui/jquery.ui.mouse.js',
|
2011-09-21 01:59:42 +04:00
|
|
|
'js/lib/jquery-ui/jquery.ui.autocomplete.js',
|
|
|
|
'js/lib/jquery-ui/jquery.ui.datepicker.js',
|
2011-09-22 21:57:48 +04:00
|
|
|
'js/lib/jquery-ui/jquery.ui.sortable.js',
|
2011-09-21 01:59:42 +04:00
|
|
|
|
2012-01-19 01:59:12 +04:00
|
|
|
'js/zamboni/helpers.js',
|
2010-09-04 04:36:09 +04:00
|
|
|
'js/zamboni/global.js',
|
2010-03-09 22:54:33 +03:00
|
|
|
'js/amo2009/global.js',
|
2012-06-11 09:19:13 +04:00
|
|
|
'js/common/ratingwidget.js',
|
2011-04-08 03:00:59 +04:00
|
|
|
'js/lib/jquery-ui/jqModal.js',
|
2010-11-01 21:39:45 +03:00
|
|
|
'js/zamboni/l10n.js',
|
2011-04-27 02:20:40 +04:00
|
|
|
'js/zamboni/debouncer.js',
|
2010-03-05 19:32:48 +03:00
|
|
|
|
2010-08-25 20:32:46 +04:00
|
|
|
# Homepage
|
2012-01-28 04:53:00 +04:00
|
|
|
'js/impala/promos.js',
|
2010-08-25 20:32:46 +04:00
|
|
|
'js/zamboni/homepage.js',
|
|
|
|
|
2010-04-28 04:14:19 +04:00
|
|
|
# Add-ons details page
|
2011-04-27 02:58:20 +04:00
|
|
|
'js/lib/jquery-ui/ui.lightbox.js',
|
|
|
|
'js/get-satisfaction-v2.js',
|
|
|
|
'js/zamboni/contributions.js',
|
|
|
|
'js/zamboni/addon_details.js',
|
2011-06-10 01:46:43 +04:00
|
|
|
'js/impala/abuse.js',
|
2011-04-27 02:58:20 +04:00
|
|
|
'js/zamboni/reviews.js',
|
|
|
|
|
|
|
|
# Personas
|
2011-09-21 01:59:42 +04:00
|
|
|
'js/lib/jquery.hoverIntent.js',
|
2011-06-01 08:08:48 +04:00
|
|
|
'js/zamboni/personas_core.js',
|
2011-04-27 02:58:20 +04:00
|
|
|
'js/zamboni/personas.js',
|
|
|
|
|
|
|
|
# Collections
|
|
|
|
'js/zamboni/collections.js',
|
|
|
|
|
|
|
|
# Performance
|
|
|
|
'js/zamboni/perf.js',
|
|
|
|
|
|
|
|
# Users
|
|
|
|
'js/zamboni/users.js',
|
|
|
|
|
|
|
|
# Fix-up outgoing links
|
|
|
|
'js/zamboni/outgoing_links.js',
|
|
|
|
|
|
|
|
# Hover delay for global header
|
|
|
|
'js/global/menu.js',
|
2011-05-28 04:56:06 +04:00
|
|
|
|
|
|
|
# Password length and strength
|
2011-10-19 01:41:56 +04:00
|
|
|
'js/zamboni/password-strength.js',
|
|
|
|
|
|
|
|
# Search suggestions
|
|
|
|
'js/impala/forms.js',
|
|
|
|
'js/impala/ajaxcache.js',
|
|
|
|
'js/impala/suggestions.js',
|
2012-05-25 02:12:37 +04:00
|
|
|
'js/impala/site_suggestions.js',
|
2011-04-27 02:58:20 +04:00
|
|
|
),
|
2011-11-30 05:54:45 +04:00
|
|
|
|
|
|
|
# Impala: Things to be loaded at the top of the page
|
|
|
|
'preload': (
|
2011-09-21 01:59:42 +04:00
|
|
|
'js/lib/jquery-1.6.4.js',
|
2011-11-30 05:54:45 +04:00
|
|
|
'js/impala/preloaded.js'
|
|
|
|
),
|
|
|
|
# Impala: Things to be loaded at the bottom
|
|
|
|
'impala': (
|
2011-09-21 01:59:42 +04:00
|
|
|
'js/lib/underscore.js',
|
2011-05-05 02:01:16 +04:00
|
|
|
'js/impala/carousel.js',
|
2011-04-27 02:58:20 +04:00
|
|
|
'js/zamboni/browser.js',
|
|
|
|
'js/amo2009/addons.js',
|
|
|
|
'js/zamboni/init.js',
|
2011-10-18 01:06:22 +04:00
|
|
|
'js/impala/capabilities.js',
|
2012-03-22 04:31:00 +04:00
|
|
|
'js/lib/format.js',
|
2011-04-27 02:58:20 +04:00
|
|
|
'js/lib/jquery.cookie.js',
|
2011-06-09 03:20:05 +04:00
|
|
|
'js/zamboni/storage.js',
|
2011-11-04 20:41:28 +04:00
|
|
|
'js/zamboni/apps.js',
|
2011-08-18 22:04:55 +04:00
|
|
|
'js/zamboni/buttons.js',
|
2011-10-13 03:29:38 +04:00
|
|
|
'js/lib/jquery.pjax.js',
|
2011-10-26 03:30:19 +04:00
|
|
|
'js/impala/footer.js',
|
2012-03-22 05:35:08 +04:00
|
|
|
'js/common/keys.js',
|
2011-08-18 22:04:55 +04:00
|
|
|
|
2011-11-22 02:21:16 +04:00
|
|
|
# BrowserID
|
|
|
|
'js/zamboni/browserid_support.js',
|
|
|
|
|
2011-09-21 01:59:42 +04:00
|
|
|
# jQuery UI
|
|
|
|
'js/lib/jquery-ui/jquery.ui.core.js',
|
|
|
|
'js/lib/jquery-ui/jquery.ui.position.js',
|
|
|
|
'js/lib/jquery-ui/jquery.ui.widget.js',
|
2011-09-22 21:57:48 +04:00
|
|
|
'js/lib/jquery-ui/jquery.ui.mouse.js',
|
2011-09-21 01:59:42 +04:00
|
|
|
'js/lib/jquery-ui/jquery.ui.autocomplete.js',
|
|
|
|
'js/lib/jquery-ui/jquery.ui.datepicker.js',
|
2011-09-22 21:57:48 +04:00
|
|
|
'js/lib/jquery-ui/jquery.ui.sortable.js',
|
2011-09-21 01:59:42 +04:00
|
|
|
|
2011-05-18 12:07:05 +04:00
|
|
|
'js/zamboni/truncation.js',
|
2011-10-03 12:07:30 +04:00
|
|
|
'js/impala/ajaxcache.js',
|
2012-01-19 01:59:12 +04:00
|
|
|
'js/zamboni/helpers.js',
|
2011-04-27 02:58:20 +04:00
|
|
|
'js/zamboni/global.js',
|
2011-05-17 00:37:08 +04:00
|
|
|
'js/impala/global.js',
|
2012-06-11 23:36:31 +04:00
|
|
|
'js/common/ratingwidget.js',
|
2011-04-27 02:58:20 +04:00
|
|
|
'js/lib/jquery-ui/jqModal.js',
|
|
|
|
'js/zamboni/l10n.js',
|
2011-09-26 02:33:19 +04:00
|
|
|
'js/impala/forms.js',
|
2011-04-27 02:58:20 +04:00
|
|
|
|
|
|
|
# Homepage
|
2012-01-28 04:53:00 +04:00
|
|
|
'js/impala/promos.js',
|
2011-04-27 02:58:20 +04:00
|
|
|
'js/impala/homepage.js',
|
|
|
|
|
|
|
|
# Add-ons details page
|
2011-04-08 03:00:59 +04:00
|
|
|
'js/lib/jquery-ui/ui.lightbox.js',
|
2010-03-05 19:32:48 +03:00
|
|
|
'js/get-satisfaction-v2.js',
|
|
|
|
'js/zamboni/contributions.js',
|
2011-05-05 02:01:16 +04:00
|
|
|
'js/impala/addon_details.js',
|
2011-06-10 01:46:43 +04:00
|
|
|
'js/impala/abuse.js',
|
2011-07-20 08:26:38 +04:00
|
|
|
'js/impala/reviews.js',
|
2010-03-24 22:06:02 +03:00
|
|
|
|
2011-08-18 22:04:55 +04:00
|
|
|
# Browse listing pages
|
|
|
|
'js/impala/listing.js',
|
|
|
|
|
2010-03-24 22:06:02 +03:00
|
|
|
# Personas
|
2011-09-21 01:59:42 +04:00
|
|
|
'js/lib/jquery.hoverIntent.js',
|
2011-06-01 08:08:48 +04:00
|
|
|
'js/zamboni/personas_core.js',
|
2010-03-24 22:06:02 +03:00
|
|
|
'js/zamboni/personas.js',
|
2010-05-07 01:11:26 +04:00
|
|
|
|
2011-08-09 04:13:03 +04:00
|
|
|
# Persona creation
|
2012-03-29 00:39:34 +04:00
|
|
|
'js/common/upload-image.js',
|
2011-08-09 04:13:03 +04:00
|
|
|
'js/lib/jquery.minicolors.js',
|
|
|
|
'js/impala/persona_creation.js',
|
|
|
|
|
2010-05-07 01:11:26 +04:00
|
|
|
# Collections
|
|
|
|
'js/zamboni/collections.js',
|
2011-07-15 01:50:10 +04:00
|
|
|
'js/impala/collections.js',
|
2010-08-19 22:51:32 +04:00
|
|
|
|
2011-02-13 23:38:42 +03:00
|
|
|
# Performance
|
|
|
|
'js/zamboni/perf.js',
|
|
|
|
|
2010-08-19 22:51:32 +04:00
|
|
|
# Users
|
|
|
|
'js/zamboni/users.js',
|
2011-07-21 21:06:44 +04:00
|
|
|
'js/impala/users.js',
|
2010-11-11 22:14:17 +03:00
|
|
|
|
2011-09-21 03:18:14 +04:00
|
|
|
# Search
|
2011-10-22 07:42:30 +04:00
|
|
|
'js/impala/serializers.js',
|
2011-09-21 03:18:14 +04:00
|
|
|
'js/impala/search.js',
|
2011-10-03 12:07:30 +04:00
|
|
|
'js/impala/suggestions.js',
|
2012-05-25 02:12:37 +04:00
|
|
|
'js/impala/site_suggestions.js',
|
2011-09-21 03:18:14 +04:00
|
|
|
|
2011-10-22 04:42:45 +04:00
|
|
|
# Login
|
|
|
|
'js/impala/login.js',
|
|
|
|
|
2010-11-11 22:14:17 +03:00
|
|
|
# Fix-up outgoing links
|
|
|
|
'js/zamboni/outgoing_links.js',
|
2012-01-04 04:05:36 +04:00
|
|
|
'js/lib/stick.js',
|
2010-03-05 19:32:48 +03:00
|
|
|
),
|
2011-03-01 02:30:58 +03:00
|
|
|
'zamboni/discovery': (
|
2011-10-20 03:05:43 +04:00
|
|
|
'js/lib/jquery-1.6.4.js',
|
2011-09-21 01:59:42 +04:00
|
|
|
'js/lib/underscore.js',
|
2011-02-23 00:31:27 +03:00
|
|
|
'js/zamboni/browser.js',
|
2011-02-06 21:54:45 +03:00
|
|
|
'js/zamboni/init.js',
|
2011-10-19 21:15:23 +04:00
|
|
|
'js/impala/capabilities.js',
|
2012-03-22 04:31:00 +04:00
|
|
|
'js/lib/format.js',
|
2011-05-05 02:01:16 +04:00
|
|
|
'js/impala/carousel.js',
|
2011-02-06 21:54:45 +03:00
|
|
|
|
2011-03-01 02:30:58 +03:00
|
|
|
# Add-ons details
|
2011-08-18 22:04:55 +04:00
|
|
|
'js/lib/jquery.cookie.js',
|
|
|
|
'js/zamboni/storage.js',
|
2011-03-01 07:52:35 +03:00
|
|
|
'js/zamboni/buttons.js',
|
2011-04-08 03:00:59 +04:00
|
|
|
'js/lib/jquery-ui/ui.lightbox.js',
|
2011-02-06 21:54:45 +03:00
|
|
|
|
|
|
|
# Personas
|
2011-09-21 01:59:42 +04:00
|
|
|
'js/lib/jquery.hoverIntent.js',
|
2011-06-01 08:08:48 +04:00
|
|
|
'js/zamboni/personas_core.js',
|
2011-02-06 21:54:45 +03:00
|
|
|
'js/zamboni/personas.js',
|
|
|
|
|
2011-04-27 02:20:40 +04:00
|
|
|
'js/zamboni/debouncer.js',
|
2010-12-31 22:36:35 +03:00
|
|
|
'js/zamboni/truncation.js',
|
2012-01-28 04:53:00 +04:00
|
|
|
|
|
|
|
'js/impala/promos.js',
|
2011-03-01 02:30:58 +03:00
|
|
|
'js/zamboni/discovery_addons.js',
|
2010-09-10 03:06:35 +04:00
|
|
|
'js/zamboni/discovery_pane.js',
|
|
|
|
),
|
2011-12-22 22:02:32 +04:00
|
|
|
'zamboni/discovery-video': (
|
|
|
|
'js/lib/popcorn-1.0.js',
|
2012-05-08 03:26:43 +04:00
|
|
|
'js/webtrends/webtrends-v0.1.js',
|
2011-12-22 22:02:32 +04:00
|
|
|
'js/zamboni/discovery_video.js',
|
2012-05-08 03:26:43 +04:00
|
|
|
'js/zamboni/discovery_tracking.js',
|
2011-12-22 22:02:32 +04:00
|
|
|
),
|
2010-09-15 05:05:56 +04:00
|
|
|
'zamboni/devhub': (
|
2010-10-28 03:45:43 +04:00
|
|
|
'js/zamboni/truncation.js',
|
2012-03-29 00:39:34 +04:00
|
|
|
'js/common/upload-addon.js',
|
|
|
|
'js/common/upload-image.js',
|
2011-08-31 04:28:36 +04:00
|
|
|
'js/impala/formset.js',
|
2010-09-15 05:05:56 +04:00
|
|
|
'js/zamboni/devhub.js',
|
2011-05-26 01:09:47 +04:00
|
|
|
'js/zamboni/validator.js',
|
2011-05-26 03:44:34 +04:00
|
|
|
'js/zamboni/packager.js',
|
2010-09-15 05:05:56 +04:00
|
|
|
),
|
2011-01-21 22:47:04 +03:00
|
|
|
'zamboni/editors': (
|
|
|
|
'js/zamboni/editors.js',
|
2011-04-22 22:46:43 +04:00
|
|
|
'js/lib/highcharts.src.js'
|
2011-01-21 22:47:04 +03:00
|
|
|
),
|
2011-03-08 03:13:29 +03:00
|
|
|
'zamboni/files': (
|
2011-05-17 20:01:08 +04:00
|
|
|
'js/lib/diff_match_patch_uncompressed.js',
|
2011-06-21 01:30:29 +04:00
|
|
|
'js/lib/syntaxhighlighter/xregexp-min.js',
|
2011-05-17 20:01:08 +04:00
|
|
|
'js/lib/syntaxhighlighter/shCore.js',
|
|
|
|
'js/lib/syntaxhighlighter/shLegacy.js',
|
|
|
|
'js/lib/syntaxhighlighter/shBrushAppleScript.js',
|
|
|
|
'js/lib/syntaxhighlighter/shBrushAS3.js',
|
|
|
|
'js/lib/syntaxhighlighter/shBrushBash.js',
|
|
|
|
'js/lib/syntaxhighlighter/shBrushCpp.js',
|
|
|
|
'js/lib/syntaxhighlighter/shBrushCSharp.js',
|
|
|
|
'js/lib/syntaxhighlighter/shBrushCss.js',
|
|
|
|
'js/lib/syntaxhighlighter/shBrushDiff.js',
|
|
|
|
'js/lib/syntaxhighlighter/shBrushJava.js',
|
|
|
|
'js/lib/syntaxhighlighter/shBrushJScript.js',
|
|
|
|
'js/lib/syntaxhighlighter/shBrushPhp.js',
|
|
|
|
'js/lib/syntaxhighlighter/shBrushPlain.js',
|
|
|
|
'js/lib/syntaxhighlighter/shBrushPython.js',
|
|
|
|
'js/lib/syntaxhighlighter/shBrushSass.js',
|
|
|
|
'js/lib/syntaxhighlighter/shBrushSql.js',
|
|
|
|
'js/lib/syntaxhighlighter/shBrushVb.js',
|
|
|
|
'js/lib/syntaxhighlighter/shBrushXml.js',
|
2011-03-08 03:13:29 +03:00
|
|
|
'js/zamboni/files.js',
|
|
|
|
),
|
2010-02-17 18:18:32 +03:00
|
|
|
'zamboni/localizers': (
|
|
|
|
'js/zamboni/localizers.js',
|
|
|
|
),
|
2011-01-27 22:38:48 +03:00
|
|
|
'zamboni/mobile': (
|
2011-10-20 03:05:43 +04:00
|
|
|
'js/lib/jquery-1.6.4.js',
|
2011-11-20 03:10:59 +04:00
|
|
|
'js/lib/underscore.js',
|
2011-04-08 03:00:59 +04:00
|
|
|
'js/lib/jqmobile.js',
|
|
|
|
'js/lib/jquery.cookie.js',
|
2011-09-09 00:11:14 +04:00
|
|
|
'js/lib/jquery.pjax.js',
|
|
|
|
'js/impala/pjax.js',
|
2011-11-04 20:41:28 +04:00
|
|
|
'js/zamboni/apps.js',
|
2011-02-17 05:37:43 +03:00
|
|
|
'js/zamboni/browser.js',
|
2011-02-21 12:47:09 +03:00
|
|
|
'js/zamboni/init.js',
|
2011-10-19 21:15:23 +04:00
|
|
|
'js/impala/capabilities.js',
|
2012-03-22 04:31:00 +04:00
|
|
|
'js/lib/format.js',
|
2011-06-13 22:50:36 +04:00
|
|
|
'js/zamboni/mobile/buttons.js',
|
2011-01-27 22:38:48 +03:00
|
|
|
'js/zamboni/truncation.js',
|
2011-11-20 03:10:59 +04:00
|
|
|
'js/impala/footer.js',
|
2011-06-01 08:08:48 +04:00
|
|
|
'js/zamboni/personas_core.js',
|
|
|
|
'js/zamboni/mobile/personas.js',
|
2012-01-19 01:59:12 +04:00
|
|
|
'js/zamboni/helpers.js',
|
2011-06-01 08:08:48 +04:00
|
|
|
'js/zamboni/mobile/general.js',
|
2012-06-11 23:36:31 +04:00
|
|
|
'js/common/ratingwidget.js',
|
2011-11-23 01:40:17 +04:00
|
|
|
'js/zamboni/browserid_support.js',
|
2011-01-27 22:38:48 +03:00
|
|
|
),
|
2011-04-30 03:50:51 +04:00
|
|
|
'zamboni/stats': (
|
2011-04-30 03:04:41 +04:00
|
|
|
'js/lib/jquery-datepicker.js',
|
|
|
|
'js/lib/highcharts.src.js',
|
2011-10-11 02:22:41 +04:00
|
|
|
'js/impala/stats/csv_keys.js',
|
2012-03-10 00:32:00 +04:00
|
|
|
'js/impala/stats/helpers.js',
|
2011-10-11 02:22:41 +04:00
|
|
|
'js/impala/stats/dateutils.js',
|
|
|
|
'js/impala/stats/manager.js',
|
|
|
|
'js/impala/stats/controls.js',
|
2011-10-17 21:57:27 +04:00
|
|
|
'js/impala/stats/overview.js',
|
|
|
|
'js/impala/stats/topchart.js',
|
2011-10-11 02:22:41 +04:00
|
|
|
'js/impala/stats/chart.js',
|
2011-10-20 12:10:46 +04:00
|
|
|
'js/impala/stats/table.js',
|
2011-10-11 02:22:41 +04:00
|
|
|
'js/impala/stats/stats.js',
|
2011-04-30 03:04:41 +04:00
|
|
|
),
|
2011-08-09 14:33:41 +04:00
|
|
|
'zamboni/admin': (
|
|
|
|
'js/zamboni/admin.js',
|
|
|
|
'js/zamboni/admin_features.js',
|
|
|
|
'js/zamboni/admin_validation.js',
|
|
|
|
),
|
2011-04-11 21:49:58 +04:00
|
|
|
# This is included when DEBUG is True. Bundle in <head>.
|
|
|
|
'debug': (
|
|
|
|
'js/debug/less_setup.js',
|
2012-04-02 23:50:58 +04:00
|
|
|
'js/lib/less.js',
|
2011-04-11 21:49:58 +04:00
|
|
|
'js/debug/less_live.js',
|
|
|
|
),
|
2010-03-09 19:55:16 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-03-16 15:04:30 +03:00
|
|
|
# Caching
|
2010-01-27 01:01:21 +03:00
|
|
|
# Prefix for cache keys (will prevent collisions when running parallel copies)
|
2010-06-17 00:39:01 +04:00
|
|
|
CACHE_PREFIX = 'amo:%s:' % build_id
|
2011-11-10 04:55:31 +04:00
|
|
|
KEY_PREFIX = CACHE_PREFIX
|
2010-06-05 00:43:48 +04:00
|
|
|
FETCH_BY_ID = True
|
2010-01-27 01:01:21 +03:00
|
|
|
|
2010-02-20 00:37:18 +03:00
|
|
|
# Number of seconds a count() query should be cached. Keep it short because
|
|
|
|
# it's not possible to invalidate these queries.
|
|
|
|
CACHE_COUNT_TIMEOUT = 60
|
|
|
|
|
2011-10-13 23:53:49 +04:00
|
|
|
# To enable pylibmc compression (in bytes)
|
|
|
|
PYLIBMC_MIN_COMPRESS_LEN = 0 # disabled
|
|
|
|
|
2010-03-04 20:46:28 +03:00
|
|
|
# External tools.
|
|
|
|
JAVA_BIN = '/usr/bin/java'
|
|
|
|
|
2010-08-26 19:50:05 +04:00
|
|
|
# Add-on download settings.
|
|
|
|
MIRROR_DELAY = 30 # Minutes before we serve downloads from mirrors.
|
|
|
|
MIRROR_URL = 'http://releases.mozilla.org/pub/mozilla.org/addons'
|
2011-01-19 16:25:31 +03:00
|
|
|
LOCAL_MIRROR_URL = 'https://static.addons.mozilla.net/_files'
|
2011-01-28 20:58:31 +03:00
|
|
|
PRIVATE_MIRROR_URL = '/_privatefiles'
|
2010-08-26 19:50:05 +04:00
|
|
|
|
2010-06-10 06:23:22 +04:00
|
|
|
# File paths
|
2010-08-14 08:31:30 +04:00
|
|
|
ADDON_ICONS_PATH = UPLOADS_PATH + '/addon_icons'
|
|
|
|
COLLECTIONS_ICON_PATH = UPLOADS_PATH + '/collection_icons'
|
|
|
|
PREVIEWS_PATH = UPLOADS_PATH + '/previews'
|
2011-08-09 04:13:03 +04:00
|
|
|
PERSONAS_PATH = UPLOADS_PATH + '/personas'
|
2010-06-10 06:23:22 +04:00
|
|
|
USERPICS_PATH = UPLOADS_PATH + '/userpics'
|
2011-05-26 03:44:34 +04:00
|
|
|
PACKAGER_PATH = os.path.join(TMP_PATH, 'packager')
|
2010-11-25 05:02:30 +03:00
|
|
|
ADDON_ICONS_DEFAULT_PATH = os.path.join(MEDIA_ROOT, 'img/addon-icons')
|
2011-07-22 22:41:43 +04:00
|
|
|
|
2010-12-31 04:02:31 +03:00
|
|
|
PREVIEW_THUMBNAIL_PATH = (PREVIEWS_PATH + '/thumbs/%s/%d.png')
|
2012-03-29 01:38:01 +04:00
|
|
|
PREVIEW_FULL_PATH = (PREVIEWS_PATH + '/full/%s/%d.%s')
|
2010-12-31 04:02:31 +03:00
|
|
|
|
2010-02-02 23:22:24 +03:00
|
|
|
# URL paths
|
|
|
|
# paths for images, e.g. mozcdn.com/amo or '/static'
|
|
|
|
STATIC_URL = SITE_URL
|
2010-11-12 03:39:18 +03:00
|
|
|
ADDON_ICONS_DEFAULT_URL = MEDIA_URL + '/img/addon-icons'
|
2011-03-24 02:08:39 +03:00
|
|
|
ADDON_ICON_BASE_URL = MEDIA_URL + 'img/icons/'
|
2012-03-07 04:24:50 +04:00
|
|
|
ADDON_ICON_URL = (STATIC_URL +
|
|
|
|
'/img/uploads/addon_icons/%s/%s-%s.png?modified=%s')
|
2010-02-02 23:22:24 +03:00
|
|
|
PREVIEW_THUMBNAIL_URL = (STATIC_URL +
|
|
|
|
'/img/uploads/previews/thumbs/%s/%d.png?modified=%d')
|
2010-02-26 18:45:34 +03:00
|
|
|
PREVIEW_FULL_URL = (STATIC_URL +
|
2012-03-29 01:38:01 +04:00
|
|
|
'/img/uploads/previews/full/%s/%d.%s?modified=%d')
|
2010-08-21 00:45:53 +04:00
|
|
|
USERPICS_URL = STATIC_URL + '/img/uploads/userpics/%s/%s/%s.png?modified=%d'
|
2010-02-02 23:22:24 +03:00
|
|
|
# paths for uploaded extensions
|
2012-03-07 04:24:50 +04:00
|
|
|
COLLECTION_ICON_URL = (STATIC_URL +
|
|
|
|
'/img/uploads/collection_icons/%s/%s.png?m=%s')
|
2011-08-09 04:13:03 +04:00
|
|
|
NEW_PERSONAS_IMAGE_URL = (STATIC_URL +
|
2011-11-05 02:51:00 +04:00
|
|
|
'/img/uploads/personas/%(id)d/%(file)s')
|
2010-06-10 05:19:19 +04:00
|
|
|
PERSONAS_IMAGE_URL = ('http://www.getpersonas.com/static/'
|
2010-03-26 20:58:32 +03:00
|
|
|
'%(tens)d/%(units)d/%(id)d/%(file)s')
|
2010-06-10 05:19:19 +04:00
|
|
|
PERSONAS_IMAGE_URL_SSL = ('https://www.getpersonas.com/static/'
|
2010-03-24 22:06:02 +03:00
|
|
|
'%(tens)d/%(units)d/%(id)d/%(file)s')
|
2010-06-10 05:19:19 +04:00
|
|
|
PERSONAS_USER_ROOT = 'http://www.getpersonas.com/gallery/designer/%s'
|
2010-11-09 09:54:37 +03:00
|
|
|
PERSONAS_UPDATE_URL = 'https://www.getpersonas.com/update_check/%d'
|
2010-03-02 18:43:39 +03:00
|
|
|
|
2010-03-16 18:30:15 +03:00
|
|
|
# Outgoing URL bouncer
|
2010-03-30 03:01:24 +04:00
|
|
|
REDIRECT_URL = 'http://outgoing.mozilla.org/v1/'
|
2010-03-16 18:30:15 +03:00
|
|
|
REDIRECT_SECRET_KEY = ''
|
2012-05-05 03:10:41 +04:00
|
|
|
|
|
|
|
PFS_URL = 'https://pfs.mozilla.org/plugins/PluginFinderService.php'
|
2011-10-17 11:06:31 +04:00
|
|
|
# Allow URLs from these servers. Use full domain names.
|
|
|
|
REDIRECT_URL_WHITELIST = ['addons.mozilla.org']
|
2010-03-16 18:30:15 +03:00
|
|
|
|
2010-03-13 05:09:00 +03:00
|
|
|
# Default to short expiration; check "remember me" to override
|
2011-04-19 00:21:28 +04:00
|
|
|
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
|
2010-03-13 05:09:00 +03:00
|
|
|
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
|
|
|
|
SESSION_COOKIE_AGE = 1209600
|
|
|
|
SESSION_COOKIE_SECURE = True
|
2011-05-06 09:03:12 +04:00
|
|
|
SESSION_COOKIE_HTTPONLY = True
|
2010-11-11 06:20:05 +03:00
|
|
|
SESSION_COOKIE_DOMAIN = ".%s" % DOMAIN # bug 608797
|
2011-10-12 20:30:33 +04:00
|
|
|
MESSAGE_STORAGE = 'django.contrib.messages.storage.cookie.CookieStorage'
|
2010-03-13 05:09:00 +03:00
|
|
|
|
|
|
|
# These should have app+locale at the start to avoid redirects
|
|
|
|
LOGIN_URL = "/users/login"
|
|
|
|
LOGOUT_URL = "/users/logout"
|
|
|
|
LOGIN_REDIRECT_URL = "/"
|
|
|
|
LOGOUT_REDIRECT_URL = "/"
|
2011-12-13 22:52:15 +04:00
|
|
|
# When logging in with browser ID, a username is created automatically.
|
|
|
|
# In the case of duplicates, the process is recursive up to this number
|
|
|
|
# of times.
|
|
|
|
MAX_GEN_USERNAME_TRIES = 50
|
2010-03-13 05:09:00 +03:00
|
|
|
|
2010-03-02 18:43:39 +03:00
|
|
|
# Legacy Settings
|
|
|
|
# used by old-style CSRF token
|
|
|
|
CAKE_SESSION_TIMEOUT = 8640
|
2010-03-16 23:18:11 +03:00
|
|
|
|
2010-03-15 23:37:20 +03:00
|
|
|
# PayPal Settings
|
2011-09-08 03:02:02 +04:00
|
|
|
PAYPAL_API_VERSION = '78'
|
2011-01-26 20:06:45 +03:00
|
|
|
PAYPAL_APP_ID = ''
|
2011-02-22 09:37:34 +03:00
|
|
|
|
2011-12-23 22:06:06 +04:00
|
|
|
# URLs for various calls.
|
|
|
|
PAYPAL_API_URL = 'https://api-3t.paypal.com/nvp'
|
|
|
|
PAYPAL_CGI_URL = 'https://www.paypal.com/cgi-bin/webscr'
|
2011-09-10 01:28:05 +04:00
|
|
|
PAYPAL_PAY_URL = 'https://svcs.paypal.com/AdaptivePayments/'
|
2011-01-26 20:06:45 +03:00
|
|
|
PAYPAL_FLOW_URL = 'https://paypal.com/webapps/adaptivepayment/flow/pay'
|
2011-09-07 02:22:24 +04:00
|
|
|
PAYPAL_PERMISSIONS_URL = 'https://svcs.paypal.com/Permissions/'
|
2011-02-16 03:45:46 +03:00
|
|
|
PAYPAL_JS_URL = 'https://www.paypalobjects.com/js/external/dg.js'
|
2011-12-23 22:06:06 +04:00
|
|
|
|
|
|
|
# Permissions for the live or sandbox servers
|
2011-03-08 03:13:29 +03:00
|
|
|
PAYPAL_EMBEDDED_AUTH = {'USER': '', 'PASSWORD': '', 'SIGNATURE': ''}
|
2010-10-11 21:44:34 +04:00
|
|
|
|
2011-10-19 22:29:55 +04:00
|
|
|
# PayPal split for Adaptive Payments.
|
|
|
|
# A tuple of lists of % and destination.
|
|
|
|
PAYPAL_CHAINS = ()
|
|
|
|
|
2011-12-01 01:17:58 +04:00
|
|
|
# If the refund request is under this amount of seconds, it will be instant.
|
|
|
|
PAYPAL_REFUND_INSTANT = 30 * 60
|
|
|
|
|
2012-05-17 03:23:52 +04:00
|
|
|
# The PayPal cert that we'll use for checking.
|
|
|
|
# When None, the Mozilla CA bundle is used to look it up.
|
|
|
|
PAYPAL_CERT = None
|
|
|
|
|
2012-06-28 03:09:54 +04:00
|
|
|
# Limit PayPal pre-approvals to certain limits.
|
|
|
|
PAYPAL_LIMIT_PREAPPROVAL = True
|
|
|
|
|
2010-09-27 10:35:00 +04:00
|
|
|
# Contribution limit, one time and monthly
|
|
|
|
MAX_CONTRIBUTION = 1000
|
|
|
|
|
2010-03-16 23:18:11 +03:00
|
|
|
# Email settings
|
2010-04-10 07:49:36 +04:00
|
|
|
DEFAULT_FROM_EMAIL = "Mozilla Add-ons <nobody@mozilla.org>"
|
2010-03-16 23:18:11 +03:00
|
|
|
|
2010-04-06 02:22:05 +04:00
|
|
|
# Email goes to the console by default. s/console/smtp/ for regular delivery
|
|
|
|
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
|
|
|
|
2010-03-16 23:18:11 +03:00
|
|
|
# Please use all lowercase for the blacklist.
|
|
|
|
EMAIL_BLACKLIST = (
|
|
|
|
'nobody@mozilla.org',
|
|
|
|
)
|
2010-04-24 03:20:48 +04:00
|
|
|
|
2012-04-03 21:53:45 +04:00
|
|
|
# URL for Add-on Validation FAQ.
|
|
|
|
VALIDATION_FAQ_URL = ('https://wiki.mozilla.org/AMO:Editors/EditorGuide/'
|
|
|
|
'AddonReviews#Step_2:_Automatic_validation')
|
|
|
|
|
2010-04-24 03:20:48 +04:00
|
|
|
|
|
|
|
## Celery
|
|
|
|
BROKER_HOST = 'localhost'
|
|
|
|
BROKER_PORT = 5672
|
|
|
|
BROKER_USER = 'zamboni'
|
|
|
|
BROKER_PASSWORD = 'zamboni'
|
|
|
|
BROKER_VHOST = 'zamboni'
|
2010-08-17 01:31:53 +04:00
|
|
|
BROKER_CONNECTION_TIMEOUT = 0.1
|
2010-04-24 03:20:48 +04:00
|
|
|
CELERY_RESULT_BACKEND = 'amqp'
|
2010-05-25 05:39:11 +04:00
|
|
|
CELERY_IGNORE_RESULT = True
|
2012-03-05 23:56:59 +04:00
|
|
|
CELERY_SEND_TASK_ERROR_EMAILS = True
|
|
|
|
CELERYD_LOG_LEVEL = logging.INFO
|
2012-03-06 00:19:41 +04:00
|
|
|
CELERYD_HIJACK_ROOT_LOGGER = False
|
2012-05-01 00:42:46 +04:00
|
|
|
CELERY_IMPORTS = ('lib.video.tasks', 'lib.metrics')
|
2011-07-29 22:04:12 +04:00
|
|
|
# We have separate celeryds for processing devhub & images as fast as possible
|
|
|
|
# Some notes:
|
|
|
|
# - always add routes here instead of @task(queue=<name>)
|
|
|
|
# - when adding a queue, be sure to update deploy.py so that it gets restarted
|
2010-11-12 23:20:13 +03:00
|
|
|
CELERY_ROUTES = {
|
2011-08-24 20:35:18 +04:00
|
|
|
# Devhub.
|
2010-11-12 23:20:13 +03:00
|
|
|
'devhub.tasks.validator': {'queue': 'devhub'},
|
2011-07-29 22:04:12 +04:00
|
|
|
'devhub.tasks.compatibility_check': {'queue': 'devhub'},
|
2011-08-17 01:50:43 +04:00
|
|
|
'devhub.tasks.fetch_manifest': {'queue': 'devhub'},
|
2011-08-16 01:40:56 +04:00
|
|
|
'devhub.tasks.fetch_icon': {'queue': 'devhub'},
|
2011-07-29 22:04:12 +04:00
|
|
|
'devhub.tasks.file_validator': {'queue': 'devhub'},
|
2011-05-26 03:44:34 +04:00
|
|
|
'devhub.tasks.packager': {'queue': 'devhub'},
|
2011-08-24 20:35:18 +04:00
|
|
|
|
2012-03-28 02:19:51 +04:00
|
|
|
# Videos.
|
2012-03-28 23:59:53 +04:00
|
|
|
'lib.video.tasks.resize_video': {'queue': 'devhub'},
|
2012-03-28 02:19:51 +04:00
|
|
|
|
2011-08-24 20:35:18 +04:00
|
|
|
# Images.
|
2010-11-18 05:01:19 +03:00
|
|
|
'bandwagon.tasks.resize_icon': {'queue': 'images'},
|
|
|
|
'users.tasks.resize_photo': {'queue': 'images'},
|
|
|
|
'users.tasks.delete_photo': {'queue': 'images'},
|
2011-01-14 03:09:22 +03:00
|
|
|
'devhub.tasks.resize_icon': {'queue': 'images'},
|
|
|
|
'devhub.tasks.resize_preview': {'queue': 'images'},
|
2011-08-24 20:35:18 +04:00
|
|
|
|
|
|
|
# Bulk.
|
2011-05-27 23:54:05 +04:00
|
|
|
'zadmin.tasks.bulk_validate_file': {'queue': 'bulk'},
|
2011-09-29 03:32:48 +04:00
|
|
|
'zadmin.tasks.tally_validation_results': {'queue': 'bulk'},
|
|
|
|
'zadmin.tasks.add_validation_jobs': {'queue': 'bulk'},
|
|
|
|
'zadmin.tasks.notify_success': {'queue': 'bulk'},
|
|
|
|
'zadmin.tasks.notify_failed': {'queue': 'bulk'},
|
2011-05-27 23:54:05 +04:00
|
|
|
'devhub.tasks.flag_binary': {'queue': 'bulk'},
|
2011-08-24 20:35:18 +04:00
|
|
|
'stats.tasks.index_update_counts': {'queue': 'bulk'},
|
|
|
|
'stats.tasks.index_download_counts': {'queue': 'bulk'},
|
2010-11-12 23:20:13 +03:00
|
|
|
}
|
2010-05-25 05:39:11 +04:00
|
|
|
|
2012-04-02 20:52:43 +04:00
|
|
|
# This is just a place to store these values, you apply them in your
|
|
|
|
# task decorator, for example:
|
|
|
|
# @task(time_limit=CELERY_TIME_LIMITS['lib...']['hard'])
|
|
|
|
# Otherwise your task will use the default settings.
|
|
|
|
CELERY_TIME_LIMITS = {
|
|
|
|
'lib.video.tasks.resize_video': {'soft': 360, 'hard': 600},
|
|
|
|
}
|
|
|
|
|
2011-06-30 20:13:50 +04:00
|
|
|
# When testing, we always want tasks to raise exceptions. Good for sanity.
|
|
|
|
CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
|
|
|
|
|
2011-12-07 01:20:45 +04:00
|
|
|
# Time in seconds before celery.exceptions.SoftTimeLimitExceeded is raised.
|
|
|
|
# The task can catch that and recover but should exit ASAP. Note that there is
|
|
|
|
# a separate, shorter timeout for validation tasks.
|
|
|
|
CELERYD_TASK_SOFT_TIME_LIMIT = 60 * 2
|
2010-05-19 01:23:37 +04:00
|
|
|
|
|
|
|
## Fixture Magic
|
|
|
|
CUSTOM_DUMPS = {
|
|
|
|
'addon': { # ./manage.py custom_dump addon id
|
|
|
|
'primary': 'addons.addon', # This is our reference model.
|
|
|
|
'dependents': [ # These are items we wish to dump.
|
|
|
|
# Magic turns this into current_version.files.all()[0].
|
|
|
|
'current_version.files.all.0',
|
2010-08-11 02:28:10 +04:00
|
|
|
'current_version.apps.all.0',
|
2010-08-11 03:04:01 +04:00
|
|
|
'addonuser_set.all.0',
|
2010-05-19 01:23:37 +04:00
|
|
|
],
|
2010-08-11 02:28:10 +04:00
|
|
|
'order': ('applications.application', 'translations.translation',
|
|
|
|
'addons.addontype', 'files.platform', 'addons.addon',
|
|
|
|
'versions.license', 'versions.version', 'files.file'),
|
2010-06-24 03:56:45 +04:00
|
|
|
'excludes': {
|
2010-06-26 02:21:17 +04:00
|
|
|
'addons.addon': ('_current_version',),
|
2010-06-24 03:56:45 +04:00
|
|
|
}
|
2010-05-19 01:23:37 +04:00
|
|
|
}
|
|
|
|
}
|
2010-05-28 23:47:47 +04:00
|
|
|
|
2010-07-22 00:58:05 +04:00
|
|
|
## Hera (http://github.com/clouserw/hera)
|
2010-08-10 21:40:50 +04:00
|
|
|
HERA = [{'USERNAME': '',
|
2010-07-22 00:58:05 +04:00
|
|
|
'PASSWORD': '',
|
|
|
|
'LOCATION': '',
|
2010-08-10 21:40:50 +04:00
|
|
|
}]
|
2010-06-30 02:28:40 +04:00
|
|
|
|
2010-05-28 23:47:47 +04:00
|
|
|
# Logging
|
|
|
|
LOG_LEVEL = logging.DEBUG
|
|
|
|
HAS_SYSLOG = True # syslog is used if HAS_SYSLOG and NOT DEBUG.
|
|
|
|
SYSLOG_TAG = "http_app_addons"
|
2011-01-25 01:26:13 +03:00
|
|
|
SYSLOG_TAG2 = "http_app_addons2"
|
2010-11-17 03:45:22 +03:00
|
|
|
# See PEP 391 and log_settings.py for formatting help. Each section of
|
|
|
|
# LOGGING will get merged into the corresponding section of
|
|
|
|
# log_settings.py. Handlers and log levels are set up automatically based
|
|
|
|
# on LOG_LEVEL and DEBUG unless you set them here. Messages will not
|
|
|
|
# propagate through a logger unless propagate: True is set.
|
|
|
|
LOGGING_CONFIG = None
|
2010-05-28 23:47:47 +04:00
|
|
|
LOGGING = {
|
|
|
|
'loggers': {
|
2010-06-11 07:00:56 +04:00
|
|
|
'amqplib': {'handlers': ['null']},
|
2011-07-21 00:57:37 +04:00
|
|
|
'caching.invalidation': {'handlers': ['null']},
|
2011-07-21 01:19:14 +04:00
|
|
|
'caching': {'level': logging.WARNING},
|
2011-05-19 03:32:57 +04:00
|
|
|
'pyes': {'handlers': ['null']},
|
2010-12-07 19:03:38 +03:00
|
|
|
'rdflib': {'handlers': ['null']},
|
2010-06-30 02:28:40 +04:00
|
|
|
'suds': {'handlers': ['null']},
|
2010-06-05 02:29:48 +04:00
|
|
|
'z.task': {'level': logging.INFO},
|
2011-10-21 03:42:09 +04:00
|
|
|
'z.es': {'level': logging.INFO},
|
2011-08-11 21:18:36 +04:00
|
|
|
'nose': {'level': logging.WARNING},
|
2010-05-28 23:47:47 +04:00
|
|
|
},
|
|
|
|
}
|
2010-06-23 04:38:28 +04:00
|
|
|
|
2011-12-02 01:53:51 +04:00
|
|
|
CEF_PRODUCT = "amo"
|
|
|
|
|
2010-09-23 00:42:49 +04:00
|
|
|
# CSP Settings
|
|
|
|
CSP_REPORT_URI = '/services/csp/report'
|
2011-05-11 03:26:30 +04:00
|
|
|
CSP_POLICY_URI = '/services/csp/policy?build=%s' % build_id
|
2010-09-23 00:42:49 +04:00
|
|
|
CSP_REPORT_ONLY = True
|
|
|
|
|
|
|
|
CSP_ALLOW = ("'self'",)
|
2010-10-05 21:49:53 +04:00
|
|
|
CSP_IMG_SRC = ("'self'", STATIC_URL,
|
2010-10-13 01:08:26 +04:00
|
|
|
"https://www.google.com", # Recaptcha comes from google
|
2010-10-05 21:49:53 +04:00
|
|
|
"https://statse.webtrendslive.com",
|
2011-04-19 21:46:39 +04:00
|
|
|
"https://www.getpersonas.com",
|
2011-05-23 22:08:02 +04:00
|
|
|
"https://s3.amazonaws.com", # getsatisfaction
|
2011-04-19 21:46:39 +04:00
|
|
|
)
|
2010-10-05 23:32:19 +04:00
|
|
|
CSP_SCRIPT_SRC = ("'self'", STATIC_URL,
|
2010-10-13 01:08:26 +04:00
|
|
|
"https://www.google.com", # Recaptcha
|
2011-07-30 01:28:20 +04:00
|
|
|
"https://browserid.org",
|
2011-04-11 20:08:50 +04:00
|
|
|
"https://www.paypalobjects.com",
|
2010-10-05 23:32:19 +04:00
|
|
|
)
|
2010-09-23 00:42:49 +04:00
|
|
|
CSP_STYLE_SRC = ("'self'", STATIC_URL,)
|
|
|
|
CSP_OBJECT_SRC = ("'none'",)
|
|
|
|
CSP_MEDIA_SRC = ("'none'",)
|
2011-05-23 22:08:02 +04:00
|
|
|
CSP_FRAME_SRC = ("https://s3.amazonaws.com", # getsatisfaction
|
|
|
|
"https://getsatisfaction.com", # getsatisfaction
|
2011-04-19 21:46:39 +04:00
|
|
|
)
|
2011-11-17 02:22:07 +04:00
|
|
|
CSP_FONT_SRC = ("'self'", "fonts.mozilla.org", "www.mozilla.org", )
|
2011-01-26 20:06:45 +03:00
|
|
|
# self is needed for paypal which sends x-frame-options:allow when needed.
|
|
|
|
# x-frame-options:DENY is sent the rest of the time.
|
|
|
|
CSP_FRAME_ANCESTORS = ("'self'",)
|
|
|
|
|
2010-09-23 00:42:49 +04:00
|
|
|
|
2010-10-16 01:50:46 +04:00
|
|
|
# Should robots.txt deny everything or disallow a calculated list of URLs we
|
|
|
|
# don't want to be crawled? Default is false, disallow everything.
|
2011-01-31 20:03:43 +03:00
|
|
|
# Also see http://www.google.com/support/webmasters/bin/answer.py?answer=93710
|
2010-10-16 01:50:46 +04:00
|
|
|
ENGAGE_ROBOTS = False
|
|
|
|
|
2010-06-23 04:38:28 +04:00
|
|
|
# Read-only mode setup.
|
|
|
|
READ_ONLY = False
|
|
|
|
|
2011-01-04 21:26:59 +03:00
|
|
|
|
2010-06-23 04:38:28 +04:00
|
|
|
# Turn on read-only mode in settings_local.py by putting this line
|
|
|
|
# at the VERY BOTTOM: read_only_mode(globals())
|
|
|
|
def read_only_mode(env):
|
|
|
|
env['READ_ONLY'] = True
|
|
|
|
|
|
|
|
# Replace the default (master) db with a slave connection.
|
|
|
|
if not env.get('SLAVE_DATABASES'):
|
|
|
|
raise Exception("We need at least one slave database.")
|
|
|
|
slave = env['SLAVE_DATABASES'][0]
|
|
|
|
env['DATABASES']['default'] = env['DATABASES'][slave]
|
|
|
|
|
|
|
|
# No sessions without the database, so disable auth.
|
2011-04-01 05:00:01 +04:00
|
|
|
env['AUTHENTICATION_BACKENDS'] = ('users.backends.NoAuthForYou',)
|
2010-06-23 04:38:28 +04:00
|
|
|
|
|
|
|
# Add in the read-only middleware before csrf middleware.
|
|
|
|
extra = 'amo.middleware.ReadOnlyMiddleware'
|
2011-04-19 00:21:28 +04:00
|
|
|
before = 'session_csrf.CsrfMiddleware'
|
2010-06-23 04:38:28 +04:00
|
|
|
m = list(env['MIDDLEWARE_CLASSES'])
|
|
|
|
m.insert(m.index(before), extra)
|
|
|
|
env['MIDDLEWARE_CLASSES'] = tuple(m)
|
2010-07-16 03:46:37 +04:00
|
|
|
|
|
|
|
|
2010-07-27 22:35:26 +04:00
|
|
|
# Uploaded file limits
|
|
|
|
MAX_ICON_UPLOAD_SIZE = 4 * 1024 * 1024
|
2012-03-29 01:38:01 +04:00
|
|
|
MAX_VIDEO_UPLOAD_SIZE = 4 * 1024 * 1024
|
2010-08-21 00:45:53 +04:00
|
|
|
MAX_PHOTO_UPLOAD_SIZE = MAX_ICON_UPLOAD_SIZE
|
2011-08-09 04:13:03 +04:00
|
|
|
MAX_PERSONA_UPLOAD_SIZE = 300 * 1024
|
2011-08-17 01:50:43 +04:00
|
|
|
MAX_WEBAPP_UPLOAD_SIZE = 2 * 1024 * 1024
|
2010-07-27 22:35:26 +04:00
|
|
|
|
2010-08-19 22:51:32 +04:00
|
|
|
# RECAPTCHA - copy all three statements to settings_local.py
|
2010-08-24 21:38:15 +04:00
|
|
|
RECAPTCHA_PUBLIC_KEY = ''
|
|
|
|
RECAPTCHA_PRIVATE_KEY = ''
|
2011-04-28 20:52:57 +04:00
|
|
|
RECAPTCHA_URL = ('https://www.google.com/recaptcha/api/challenge?k=%s' %
|
2010-08-19 22:51:32 +04:00
|
|
|
RECAPTCHA_PUBLIC_KEY)
|
2012-05-30 05:14:31 +04:00
|
|
|
RECAPTCHA_AJAX_URL = 'https://www.google.com/recaptcha/api/js/recaptcha_ajax.js'
|
2010-09-24 02:20:54 +04:00
|
|
|
|
|
|
|
# Send Django signals asynchronously on a background thread.
|
|
|
|
ASYNC_SIGNALS = True
|
2010-10-06 03:32:54 +04:00
|
|
|
|
|
|
|
# Performance notes on add-ons
|
|
|
|
PERFORMANCE_NOTES = False
|
2010-11-04 01:49:17 +03:00
|
|
|
|
2011-07-26 22:09:28 +04:00
|
|
|
# Used to flag slow addons.
|
|
|
|
# If slowness of addon is THRESHOLD percent slower, show a warning.
|
2011-04-07 10:08:58 +04:00
|
|
|
PERF_THRESHOLD = 25
|
|
|
|
|
2010-11-17 01:32:14 +03:00
|
|
|
REDIS_BACKENDS = {'master': 'redis://localhost:6379?socket_timeout=0.5'}
|
2010-11-05 22:14:19 +03:00
|
|
|
|
|
|
|
# Directory of JavaScript test files for django_qunit to run
|
|
|
|
QUNIT_TEST_DIRECTORY = os.path.join(MEDIA_ROOT, 'js', 'zamboni', 'tests')
|
2010-12-21 02:10:42 +03:00
|
|
|
|
|
|
|
# Full path or executable path (relative to $PATH) of the spidermonkey js
|
|
|
|
# binary. It must be a version compatible with amo-validator
|
|
|
|
SPIDERMONKEY = None
|
2010-12-28 21:33:12 +03:00
|
|
|
VALIDATE_ADDONS = True
|
2011-12-06 01:08:02 +04:00
|
|
|
# Number of seconds before celery tasks will abort addon validation:
|
2011-12-12 22:39:55 +04:00
|
|
|
VALIDATOR_TIMEOUT = 90
|
2011-01-04 21:28:05 +03:00
|
|
|
|
2011-06-22 02:19:51 +04:00
|
|
|
# When True include full tracebacks in JSON. This is useful for QA on preview.
|
|
|
|
EXPOSE_VALIDATOR_TRACEBACKS = False
|
|
|
|
|
2012-05-25 01:42:22 +04:00
|
|
|
# Max number of warnings/errors to show from validator. Set to None for no
|
|
|
|
# limit.
|
2012-05-11 02:01:46 +04:00
|
|
|
VALIDATOR_MESSAGE_LIMIT = 500
|
|
|
|
|
2011-01-04 21:28:05 +03:00
|
|
|
# Feature flags
|
|
|
|
SEARCH_EXCLUDE_PERSONAS = True
|
2011-01-12 00:37:33 +03:00
|
|
|
UNLINK_SITE_STATS = True
|
2011-06-30 21:40:15 +04:00
|
|
|
|
2011-01-31 21:29:12 +03:00
|
|
|
# Set to True if we're allowed to use X-SENDFILE.
|
|
|
|
XSENDFILE = True
|
2012-05-22 03:46:41 +04:00
|
|
|
XSENDFILE_HEADER = 'X-SENDFILE'
|
2011-02-02 07:32:42 +03:00
|
|
|
|
|
|
|
MOBILE_COOKIE = 'mamo'
|
2011-02-02 21:50:42 +03:00
|
|
|
|
|
|
|
# If the users's Firefox has a version number greater than this we consider it
|
|
|
|
# a beta.
|
|
|
|
MIN_BETA_VERSION = '3.7'
|
2011-01-26 20:06:45 +03:00
|
|
|
|
|
|
|
DEFAULT_SUGGESTED_CONTRIBUTION = 5
|
2011-02-16 00:27:15 +03:00
|
|
|
|
|
|
|
# Path to `ps`.
|
|
|
|
PS_BIN = '/bin/ps'
|
2011-02-19 03:27:02 +03:00
|
|
|
|
|
|
|
BLOCKLIST_COOKIE = 'BLOCKLIST_v1'
|
2011-02-10 22:08:16 +03:00
|
|
|
|
2011-06-01 23:38:13 +04:00
|
|
|
# The maximum file size that is shown inside the file viewer.
|
2011-04-27 22:12:18 +04:00
|
|
|
FILE_VIEWER_SIZE_LIMIT = 1048576
|
2011-06-01 23:38:13 +04:00
|
|
|
# The maximum file size that you can have inside a zip file.
|
2011-06-02 04:19:14 +04:00
|
|
|
FILE_UNZIP_SIZE_LIMIT = 104857600
|
2011-04-29 02:25:34 +04:00
|
|
|
|
|
|
|
# How long to delay modify updates to cope with alleged NFS slowness.
|
2011-05-03 00:52:53 +04:00
|
|
|
MODIFIED_DELAY = 3
|
2011-04-11 21:44:52 +04:00
|
|
|
|
|
|
|
# This is a list of dictionaries that we should generate compat info for.
|
|
|
|
# app: should match amo.FIREFOX.id.
|
2011-06-17 23:06:42 +04:00
|
|
|
# main: the app version we're generating compat info for.
|
|
|
|
# versions: version numbers to show in comparisons.
|
|
|
|
# previous: the major version before :main.
|
2011-04-11 21:44:52 +04:00
|
|
|
COMPAT = (
|
2011-08-03 22:30:45 +04:00
|
|
|
# Firefox.
|
2012-05-02 20:10:48 +04:00
|
|
|
dict(app=1, main='15.0', versions=('15.0', '15.0a2', '15.0a1'),
|
|
|
|
previous='14.0'),
|
|
|
|
dict(app=1, main='14.0', versions=('14.0', '14.0a2', '14.0a1'),
|
|
|
|
previous='13.0'),
|
2012-03-20 20:42:34 +04:00
|
|
|
dict(app=1, main='13.0', versions=('13.0', '13.0a2', '13.0a1'),
|
|
|
|
previous='12.0'),
|
|
|
|
dict(app=1, main='12.0', versions=('12.0', '12.0a2', '12.0a1'),
|
|
|
|
previous='11.0'),
|
2011-12-29 22:18:41 +04:00
|
|
|
dict(app=1, main='11.0', versions=('11.0', '11.0a2', '11.0a1'),
|
|
|
|
previous='10.0'),
|
2011-10-01 01:20:57 +04:00
|
|
|
dict(app=1, main='10.0', versions=('10.0', '10.0a2', '10.0a1'),
|
|
|
|
previous='9.0'),
|
|
|
|
dict(app=1, main='9.0', versions=('9.0', '9.0a2', '9.0a1'),
|
|
|
|
previous='8.0'),
|
2011-08-02 02:01:30 +04:00
|
|
|
dict(app=1, main='8.0', versions=('8.0', '8.0a2', '8.0a1'),
|
|
|
|
previous='7.0'),
|
|
|
|
dict(app=1, main='7.0', versions=('7.0', '7.0a2', '7.0a1'),
|
|
|
|
previous='6.0'),
|
|
|
|
dict(app=1, main='6.0', versions=('6.0', '6.0a2', '6.0a1'),
|
|
|
|
previous='5.0'),
|
|
|
|
dict(app=1, main='5.0', versions=('5.0', '5.0a2', '5.0a1'),
|
|
|
|
previous='4.0'),
|
|
|
|
dict(app=1, main='4.0', versions=('4.0', '4.0a1', '3.7a'),
|
|
|
|
previous='3.6'),
|
2011-08-03 22:30:45 +04:00
|
|
|
# Thunderbird.
|
2012-05-02 20:10:48 +04:00
|
|
|
dict(app=18, main='15.0', versions=('15.0', '15.0a2', '15.0a1'),
|
|
|
|
previous='14.0'),
|
|
|
|
dict(app=18, main='14.0', versions=('14.0', '14.0a2', '14.0a1'),
|
|
|
|
previous='13.0'),
|
2012-03-20 20:42:34 +04:00
|
|
|
dict(app=18, main='13.0', versions=('13.0', '13.0a2', '13.0a1'),
|
|
|
|
previous='12.0'),
|
|
|
|
dict(app=18, main='12.0', versions=('12.0', '12.0a2', '12.0a1'),
|
|
|
|
previous='11.0'),
|
|
|
|
dict(app=18, main='11.0', versions=('11.0', '11.0a2', '11.0a1'),
|
|
|
|
previous='10.0'),
|
|
|
|
dict(app=18, main='10.0', versions=('10.0', '10.0a2', '10.0a1'),
|
|
|
|
previous='9.0'),
|
|
|
|
dict(app=18, main='9.0', versions=('9.0', '9.0a2', '9.0a1'),
|
|
|
|
previous='8.0'),
|
|
|
|
dict(app=18, main='8.0', versions=('8.0', '8.0a2', '8.0a1'),
|
|
|
|
previous='7.0'),
|
|
|
|
dict(app=18, main='7.0', versions=('7.0', '7.0a2', '7.0a1'),
|
|
|
|
previous='6.0'),
|
2011-08-03 22:30:45 +04:00
|
|
|
dict(app=18, main='6.0', versions=('6.0', '6.0a2', '6.0a1'),
|
|
|
|
previous='5.0'),
|
|
|
|
# Seamonkey.
|
|
|
|
dict(app=59, main='2.3', versions=('2.3', '2.3b', '2.3a'),
|
|
|
|
previous='2.2'),
|
2011-04-11 21:44:52 +04:00
|
|
|
)
|
2011-04-30 03:23:44 +04:00
|
|
|
|
2011-09-01 04:12:58 +04:00
|
|
|
# Latest nightly version of Firefox.
|
|
|
|
NIGHTLY_VERSION = COMPAT[0]['main']
|
|
|
|
|
2011-10-06 10:30:04 +04:00
|
|
|
# Default minimum version of Firefox/Thunderbird for Add-on Packager.
|
|
|
|
DEFAULT_MINVER = COMPAT[4]['main']
|
2011-10-05 01:28:33 +04:00
|
|
|
|
2011-04-30 03:23:44 +04:00
|
|
|
# URL for reporting arecibo errors too. If not set, won't be sent.
|
|
|
|
ARECIBO_SERVER_URL = ""
|
2011-05-11 21:25:26 +04:00
|
|
|
|
|
|
|
# A whitelist of domains that the authentication script will redirect to upon
|
|
|
|
# successfully logging in or out.
|
|
|
|
VALID_LOGIN_REDIRECTS = {
|
|
|
|
'builder': 'https://builder.addons.mozilla.org',
|
2011-11-06 22:20:07 +04:00
|
|
|
'builderstage': 'https://builder-addons.allizom.org',
|
|
|
|
'buildertrunk': 'https://builder-addons-dev.allizom.org',
|
2011-05-11 21:25:26 +04:00
|
|
|
}
|
2011-05-17 04:07:57 +04:00
|
|
|
|
2011-05-18 23:08:59 +04:00
|
|
|
# Secret key we send to builder so we can trust responses from the builder.
|
2011-05-17 04:07:57 +04:00
|
|
|
BUILDER_SECRET_KEY = 'love will tear us apart'
|
2011-05-24 03:34:21 +04:00
|
|
|
# The builder URL we hit to upgrade jetpacks.
|
|
|
|
BUILDER_UPGRADE_URL = 'https://addons.mozilla.org/services/builder'
|
2011-10-25 00:35:07 +04:00
|
|
|
BUILDER_VERSIONS_URL = ('https://builder.addons.mozilla.org/repackage/' +
|
2011-10-24 12:12:56 +04:00
|
|
|
'sdk-versions/')
|
2011-05-18 01:39:08 +04:00
|
|
|
|
|
|
|
## Elastic Search
|
|
|
|
ES_HOSTS = ['127.0.0.1:9200']
|
2011-09-07 23:16:58 +04:00
|
|
|
ES_INDEXES = {'default': 'amo',
|
|
|
|
'update_counts': 'amo_stats',
|
2012-03-06 00:03:54 +04:00
|
|
|
'download_counts': 'amo_stats',
|
2012-05-17 01:25:22 +04:00
|
|
|
'stats_contributions': 'amo_stats',
|
2012-04-05 02:36:46 +04:00
|
|
|
'stats_collections_counts': 'amo_stats',
|
|
|
|
'users_install': 'amo_stats'}
|
2012-04-14 02:16:01 +04:00
|
|
|
ES_TIMEOUT = 30
|
2011-05-25 00:09:56 +04:00
|
|
|
|
|
|
|
# Default AMO user id to use for tasks.
|
|
|
|
TASK_USER_ID = 4757633
|
2011-05-26 00:38:11 +04:00
|
|
|
|
|
|
|
# If this is False, tasks and other jobs that send non-critical emails should
|
|
|
|
# use a fake email backend.
|
|
|
|
SEND_REAL_EMAIL = False
|
2011-05-27 19:55:04 +04:00
|
|
|
|
|
|
|
STATSD_HOST = 'localhost'
|
|
|
|
STATSD_PORT = 8125
|
|
|
|
STATSD_PREFIX = 'amo'
|
2011-06-01 15:53:28 +04:00
|
|
|
|
2011-12-31 04:02:18 +04:00
|
|
|
# The django statsd client to use, see django-statsd for more.
|
|
|
|
STATSD_CLIENT = 'django_statsd.clients.normal'
|
|
|
|
|
2011-06-14 01:48:07 +04:00
|
|
|
GRAPHITE_HOST = 'localhost'
|
|
|
|
GRAPHITE_PORT = 2003
|
|
|
|
GRAPHITE_PREFIX = 'amo'
|
|
|
|
GRAPHITE_TIMEOUT = 1
|
|
|
|
|
2011-06-01 15:53:28 +04:00
|
|
|
# URL to the service that triggers addon performance tests. See devhub.perf.
|
|
|
|
PERF_TEST_URL = 'http://areweperftestingyet.com/trigger.cgi'
|
2011-12-29 00:48:24 +04:00
|
|
|
PERF_TEST_TIMEOUT = 5 # seconds
|
2011-06-15 03:19:24 +04:00
|
|
|
|
|
|
|
# IP addresses of servers we use as proxies.
|
|
|
|
KNOWN_PROXIES = []
|
2011-06-18 05:01:42 +04:00
|
|
|
|
|
|
|
# Blog URL
|
2011-07-14 03:58:46 +04:00
|
|
|
DEVELOPER_BLOG_URL = 'http://blog.mozilla.com/addons/feed/'
|
|
|
|
|
|
|
|
LOGIN_RATELIMIT_USER = 5
|
|
|
|
LOGIN_RATELIMIT_ALL_USERS = '15/m'
|
2011-08-05 20:29:27 +04:00
|
|
|
|
2011-11-15 22:40:46 +04:00
|
|
|
# The verification URL, the addon id will be appended to this. This will
|
|
|
|
# have to be altered to the right domain for each server, eg:
|
|
|
|
# https://receiptcheck.addons.mozilla.org/verify/
|
|
|
|
WEBAPPS_RECEIPT_URL = '%s/verify/' % SITE_URL
|
2011-09-01 23:23:19 +04:00
|
|
|
# The key we'll use to sign webapp receipts.
|
|
|
|
WEBAPPS_RECEIPT_KEY = ''
|
2012-04-18 03:23:53 +04:00
|
|
|
# The expiry that we will add into the receipt.
|
2012-05-08 20:11:25 +04:00
|
|
|
# Set to 6 months for the next little while.
|
|
|
|
WEBAPPS_RECEIPT_EXPIRY_SECONDS = 60 * 60 * 24 * 182
|
2012-05-16 12:28:36 +04:00
|
|
|
# Send a new receipt back when it expires.
|
|
|
|
WEBAPPS_RECEIPT_EXPIRED_SEND = False
|
2011-08-25 02:27:21 +04:00
|
|
|
|
|
|
|
# How long a watermarked addon should be re-used for, after this
|
|
|
|
# time it will be regenerated.
|
|
|
|
WATERMARK_REUSE_SECONDS = 1800
|
|
|
|
# How long a watermarked addon should wait before being deleted
|
|
|
|
# by a cron. Setting this far apart from the reuse flag so that we
|
|
|
|
# shouldn't have an overlap.
|
|
|
|
WATERMARK_CLEANUP_SECONDS = 3600
|
2011-10-05 03:01:26 +04:00
|
|
|
# Used in providing a hash for the download of the addon.
|
|
|
|
WATERMARK_SECRET_KEY = ''
|
2011-09-09 00:11:14 +04:00
|
|
|
|
2011-09-10 03:52:10 +04:00
|
|
|
CSRF_FAILURE_VIEW = 'amo.views.csrf_failure'
|
2011-09-09 00:11:14 +04:00
|
|
|
|
|
|
|
# CSS selector for what part of the response to return in an X-PJAX request
|
|
|
|
PJAX_SELECTOR = '#page'
|
2011-10-05 23:39:56 +04:00
|
|
|
|
|
|
|
# Testing responsiveness without rate limits.
|
|
|
|
CELERY_DISABLE_RATE_LIMITS = True
|
2011-11-01 22:11:37 +04:00
|
|
|
|
2011-11-01 22:29:32 +04:00
|
|
|
# Temporary variables for the app-preview server, set this to True
|
|
|
|
# if you want to experience app-preview.mozilla.org.
|
|
|
|
APP_PREVIEW = False
|
|
|
|
|
2012-02-18 03:17:57 +04:00
|
|
|
# Super temporary.
|
|
|
|
MARKETPLACE = False
|
|
|
|
|
|
|
|
# Name of view to use for homepage. AMO uses this. Marketplace has its own.
|
|
|
|
HOME = 'addons.views.home'
|
|
|
|
|
2011-11-02 01:38:14 +04:00
|
|
|
# Sets an upper limit on the number of users. If 0, it's ignored. If the
|
|
|
|
# number of users meets or exceeds this, they can't register.
|
|
|
|
REGISTER_USER_LIMIT = 0
|
2011-12-01 06:29:45 +04:00
|
|
|
# Set this token to a string value to enable users to override the
|
|
|
|
# registration limit. For example, with a token of 'mozillians' anyone can
|
|
|
|
# bypass the limit by adding ?ro=mozillians to the URL.
|
|
|
|
REGISTER_OVERRIDE_TOKEN = None
|
2011-11-02 23:10:21 +04:00
|
|
|
|
2012-02-01 21:16:38 +04:00
|
|
|
# Default file storage mechanism that holds media.
|
|
|
|
DEFAULT_FILE_STORAGE = 'amo.utils.LocalFileStorage'
|
2012-02-09 22:31:18 +04:00
|
|
|
|
|
|
|
# Defined in the site, this is to allow settings patch to work for tests.
|
|
|
|
NO_LOGIN_REQUIRED_MODULES = ()
|
|
|
|
NO_ADDONS_MODULES = ()
|
|
|
|
NO_CONSUMER_MODULES = ()
|
2012-03-28 02:19:51 +04:00
|
|
|
|
2012-04-06 00:44:55 +04:00
|
|
|
# Where to find ffmpeg and totem if it's not in the PATH.
|
2012-03-28 02:19:51 +04:00
|
|
|
FFMPEG_BINARY = 'ffmpeg'
|
2012-04-06 00:44:55 +04:00
|
|
|
TOTEM_BINARIES = {'thumbnailer': 'totem-video-thumbnailer',
|
|
|
|
'indexer': 'totem-video-indexer'}
|
|
|
|
VIDEO_LIBRARIES = ['lib.video.totem', 'lib.video.ffmpeg']
|
2012-04-11 21:43:35 +04:00
|
|
|
|
|
|
|
# This is the metrics REST server for receiving data, should be a URL
|
|
|
|
# including the protocol.
|
|
|
|
METRICS_SERVER = ''
|
|
|
|
# And how long we'll give the server to respond.
|
|
|
|
METRICS_SERVER_TIMEOUT = 10
|
2012-04-13 02:23:08 +04:00
|
|
|
|
|
|
|
# Turn on/off the use of the signing server and all the related things. This
|
|
|
|
# is a temporary flag that we will remove.
|
|
|
|
SIGNING_SERVER_ACTIVE = False
|
|
|
|
# This is the signing REST server for signing receipts.
|
|
|
|
SIGNING_SERVER = ''
|
|
|
|
# And how long we'll give the server to respond.
|
|
|
|
SIGNING_SERVER_TIMEOUT = 10
|
2012-05-02 21:30:28 +04:00
|
|
|
|
|
|
|
# True when the Django app is running from the test suite.
|
|
|
|
IN_TEST_SUITE = False
|
2012-05-31 01:17:52 +04:00
|
|
|
|
|
|
|
# Until bug 753421 gets fixed, we're skipping ES tests. Sad times. I know.
|
|
|
|
# Flip this on in your local settings to experience the joy of ES tests.
|
|
|
|
RUN_ES_TESTS = False
|
2012-06-23 02:57:43 +04:00
|
|
|
|
|
|
|
# All JS vendor libraries in this list will be excluded from mozmarket.js.
|
|
|
|
# For example, if receiptverifier is broken and you need to disable it, add
|
|
|
|
# 'receiptverifier' to the list. See also mkt/site/views.py.
|
2012-06-25 19:08:51 +04:00
|
|
|
MOZMARKET_VENDOR_EXCLUDE = []
|
2012-06-26 22:54:10 +04:00
|
|
|
|
|
|
|
# The configuration for seclusion the client that speaks to solitude.
|
|
|
|
# A tuple of the solitude hosts that seclusion will speak to.
|
|
|
|
SECLUSION_HOSTS = ()
|
|
|
|
# The oAuth key and secret that solitude needs.
|
|
|
|
SECLUSION_KEY = ''
|
|
|
|
SECLUSION_SECRET = ''
|