2012-02-17 22:54:10 +04:00
|
|
|
import os
|
|
|
|
|
2012-01-18 21:11:06 +04:00
|
|
|
from lib.settings_base import *
|
2012-03-14 00:55:19 +04:00
|
|
|
from mkt import asset_bundles
|
2012-01-18 21:11:06 +04:00
|
|
|
|
2012-02-17 02:22:59 +04:00
|
|
|
# We'll soon need a `settings_test_mkt` to override this.
|
2012-01-18 21:11:06 +04:00
|
|
|
APP_PREVIEW = True
|
2012-02-17 02:22:59 +04:00
|
|
|
|
2012-02-18 03:24:50 +04:00
|
|
|
WAFFLE_TABLE_SUFFIX = 'mkt'
|
|
|
|
|
2012-02-17 02:22:59 +04:00
|
|
|
# So temporary. Allow us to link to new devhub URLs from `Addon.get_dev_url()`.
|
|
|
|
MARKETPLACE = True
|
|
|
|
|
2012-02-18 06:28:11 +04:00
|
|
|
# Pretty temporary. Set the correct home for Marketplace. Redirects are sick!
|
|
|
|
HOME = 'mkt.developers.views.home'
|
2012-02-18 03:17:57 +04:00
|
|
|
|
2012-02-20 04:58:28 +04:00
|
|
|
# 403 view to render for CSRF failures.
|
|
|
|
CSRF_FAILURE_VIEW = 'mkt.site.views.csrf_failure'
|
|
|
|
|
2012-02-24 03:59:18 +04:00
|
|
|
# Set log in/log out URLs for redirects to work.
|
|
|
|
LOGIN_URL = '/login'
|
|
|
|
LOGOUT_URL = '/logout'
|
|
|
|
|
2012-02-28 04:54:07 +04:00
|
|
|
# Let robots tear this place up.
|
|
|
|
ENGAGE_ROBOTS = True
|
|
|
|
|
2012-04-03 05:32:14 +04:00
|
|
|
MKT_REVIEWERS_EMAIL = 'app-reviews@mozilla.org'
|
|
|
|
MKT_SENIOR_EDITORS_EMAIL = 'amo-admin-reviews@mozilla.org'
|
|
|
|
MKT_SUPPORT_EMAIL = 'marketplace-developer-support@mozilla.org'
|
|
|
|
|
2012-01-18 21:11:06 +04:00
|
|
|
ROOT_URLCONF = 'mkt.urls'
|
2012-02-22 08:44:51 +04:00
|
|
|
|
|
|
|
INSTALLED_APPS = list(INSTALLED_APPS)
|
|
|
|
INSTALLED_APPS.remove('api')
|
2012-03-23 06:53:28 +04:00
|
|
|
INSTALLED_APPS.remove('browse')
|
2012-02-22 08:44:51 +04:00
|
|
|
INSTALLED_APPS.remove('compat')
|
|
|
|
INSTALLED_APPS.remove('discovery')
|
|
|
|
INSTALLED_APPS.remove('devhub')
|
2012-03-17 01:25:15 +04:00
|
|
|
INSTALLED_APPS.remove('search')
|
2012-02-22 08:44:51 +04:00
|
|
|
INSTALLED_APPS = tuple(INSTALLED_APPS)
|
|
|
|
|
2012-02-09 15:27:26 +04:00
|
|
|
INSTALLED_APPS += (
|
|
|
|
'mkt.site',
|
2012-03-24 05:13:25 +04:00
|
|
|
'mkt.account',
|
2012-03-23 06:53:28 +04:00
|
|
|
'mkt.browse',
|
2012-03-14 03:33:51 +04:00
|
|
|
'mkt.detail',
|
2012-02-17 02:22:59 +04:00
|
|
|
'mkt.developers',
|
2012-03-23 06:53:28 +04:00
|
|
|
'mkt.experiments',
|
2012-03-28 00:31:00 +04:00
|
|
|
'mkt.inapp_pay',
|
2012-03-25 22:59:41 +04:00
|
|
|
'mkt.purchase',
|
2012-04-03 04:58:17 +04:00
|
|
|
'mkt.reviewers',
|
2012-03-15 00:07:14 +04:00
|
|
|
'mkt.search',
|
2012-03-28 12:25:01 +04:00
|
|
|
'mkt.stats',
|
2012-02-09 15:27:26 +04:00
|
|
|
'mkt.submit',
|
2012-03-27 08:16:22 +04:00
|
|
|
'mkt.support',
|
2012-03-23 06:53:28 +04:00
|
|
|
'mkt.webapps',
|
2012-02-23 01:56:18 +04:00
|
|
|
'devhub', # Put here so helpers.py doesn't get loaded first.
|
2012-02-09 15:27:26 +04:00
|
|
|
)
|
|
|
|
SUPPORTED_NONAPPS += (
|
2012-03-13 05:36:01 +04:00
|
|
|
# this line is here until bug 735120 is fixed.
|
2012-03-13 05:08:49 +04:00
|
|
|
'app',
|
2012-03-23 06:53:28 +04:00
|
|
|
'apps',
|
2012-02-17 02:22:59 +04:00
|
|
|
'dev',
|
2012-02-18 06:28:11 +04:00
|
|
|
'login',
|
2012-03-23 11:55:59 +04:00
|
|
|
'logout',
|
2012-03-21 00:20:58 +04:00
|
|
|
'payments',
|
2012-02-23 23:44:03 +04:00
|
|
|
'privacy-policy',
|
2012-03-24 05:13:25 +04:00
|
|
|
'purchases',
|
2012-04-03 01:34:59 +04:00
|
|
|
'reviewers',
|
2012-03-15 00:07:14 +04:00
|
|
|
'search',
|
2012-03-28 22:00:30 +04:00
|
|
|
'settings',
|
2012-03-15 00:07:14 +04:00
|
|
|
'submit',
|
2012-03-27 08:16:22 +04:00
|
|
|
'support',
|
2012-02-23 23:44:03 +04:00
|
|
|
'terms-of-use',
|
2012-03-28 22:00:30 +04:00
|
|
|
'user',
|
2012-02-24 03:59:18 +04:00
|
|
|
'users',
|
2012-02-09 15:27:26 +04:00
|
|
|
)
|
|
|
|
|
2012-03-21 01:51:40 +04:00
|
|
|
MIDDLEWARE_CLASSES = list(MIDDLEWARE_CLASSES)
|
|
|
|
# TODO: I want to get rid of these eventually but it breaks some junk now.
|
|
|
|
# MIDDLEWARE_CLASSES.remove('mobility.middleware.DetectMobileMiddleware')
|
|
|
|
# MIDDLEWARE_CLASSES.remove('mobility.middleware.XMobileMiddleware')
|
|
|
|
# MIDDLEWARE_CLASSES.remove('cake.middleware.CookieCleaningMiddleware')
|
2012-02-18 03:17:57 +04:00
|
|
|
MIDDLEWARE_CLASSES += (
|
2012-03-21 01:51:40 +04:00
|
|
|
'mkt.site.middleware.VaryOnAJAXMiddleware',
|
2012-02-18 03:17:57 +04:00
|
|
|
'amo.middleware.NoConsumerMiddleware',
|
|
|
|
)
|
|
|
|
|
2012-03-14 05:01:08 +04:00
|
|
|
TEMPLATE_DIRS += (path('mkt/templates'),)
|
2012-02-17 06:48:48 +04:00
|
|
|
TEMPLATE_CONTEXT_PROCESSORS = list(TEMPLATE_CONTEXT_PROCESSORS)
|
|
|
|
TEMPLATE_CONTEXT_PROCESSORS.remove('amo.context_processors.global_settings')
|
|
|
|
TEMPLATE_CONTEXT_PROCESSORS += [
|
2012-03-14 02:39:55 +04:00
|
|
|
'mkt.webapps.context_processors.is_webapps',
|
2012-02-17 06:48:48 +04:00
|
|
|
'mkt.site.context_processors.global_settings',
|
2012-02-14 12:36:10 +04:00
|
|
|
'mkt.experiments.context_processors.fragment',
|
2012-02-17 06:48:48 +04:00
|
|
|
]
|
2012-02-14 12:56:35 +04:00
|
|
|
|
2012-02-15 01:22:46 +04:00
|
|
|
# Tests.
|
|
|
|
NOSE_ARGS = [
|
|
|
|
'--with-fixture-bundling',
|
2012-02-17 22:54:10 +04:00
|
|
|
'--where=%s' % os.path.join(ROOT, 'mkt')
|
2012-02-15 01:22:46 +04:00
|
|
|
]
|
2012-02-14 12:56:35 +04:00
|
|
|
|
2012-02-09 04:58:04 +04:00
|
|
|
NO_ADDONS_MODULES = (
|
|
|
|
'addons.views',
|
|
|
|
'devhub.views.dashboard', # The apps dashboard is a different view.
|
|
|
|
'devhub.views.submit', # Addon submit not ok, app submit a-ok.
|
|
|
|
'browse.views.personas',
|
|
|
|
'browse.views.extensions',
|
|
|
|
'browse.views.language_tools',
|
|
|
|
'browse.views.themes',
|
|
|
|
)
|
|
|
|
|
|
|
|
# Next level, no consumer for you!
|
|
|
|
NO_CONSUMER_MODULES = (
|
|
|
|
'api',
|
|
|
|
'bandwagon.views',
|
|
|
|
'browse.views',
|
|
|
|
'compat.views',
|
|
|
|
'discovery.views',
|
|
|
|
'files.views',
|
|
|
|
'market.views',
|
|
|
|
'piston',
|
2012-02-17 12:34:55 +04:00
|
|
|
'users.views.edit',
|
2012-02-09 04:58:04 +04:00
|
|
|
'users.views.purchases',
|
|
|
|
'users.views.payments',
|
|
|
|
'sharing.views',
|
|
|
|
'tags.views',
|
|
|
|
'versions.views',
|
2012-03-14 03:20:47 +04:00
|
|
|
'mkt.webapps.views',
|
2012-02-09 04:58:04 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
# Specific view modules and methods that we don't want to force login on.
|
|
|
|
NO_LOGIN_REQUIRED_MODULES = (
|
|
|
|
'csp.views.policy',
|
|
|
|
'csp.views.report',
|
2012-02-24 04:43:13 +04:00
|
|
|
'mkt.developers',
|
|
|
|
'mkt.submit',
|
2012-02-09 04:58:04 +04:00
|
|
|
'django.views.i18n.javascript_catalog',
|
|
|
|
'django.contrib.auth.views.password_reset',
|
2012-02-24 04:16:47 +04:00
|
|
|
'django.contrib.auth.views.password_reset_done',
|
|
|
|
'jingo.views.direct_to_template'
|
2012-02-09 04:58:04 +04:00
|
|
|
)
|
2012-02-10 06:23:37 +04:00
|
|
|
|
2012-02-09 15:27:26 +04:00
|
|
|
# Extend the bundles.
|
2012-03-14 00:55:19 +04:00
|
|
|
MINIFY_BUNDLES['css'].update(asset_bundles.CSS)
|
|
|
|
MINIFY_BUNDLES['js'].update(asset_bundles.JS)
|
2012-02-10 06:23:37 +04:00
|
|
|
|
2012-02-23 22:06:05 +04:00
|
|
|
CELERY_ROUTES.update({
|
|
|
|
# Devhub.
|
|
|
|
'mkt.developers.tasks.validator': {'queue': 'devhub'},
|
|
|
|
'mkt.developers.tasks.fetch_manifest': {'queue': 'devhub'},
|
|
|
|
'mkt.developers.tasks.fetch_icon': {'queue': 'devhub'},
|
|
|
|
'mkt.developers.tasks.file_validator': {'queue': 'devhub'},
|
|
|
|
|
|
|
|
# Images.
|
|
|
|
'mkt.developers.tasks.resize_icon': {'queue': 'images'},
|
|
|
|
'mkt.developers.tasks.resize_preview': {'queue': 'images'},
|
|
|
|
})
|
|
|
|
|
2012-02-24 23:45:44 +04:00
|
|
|
# Paths.
|
|
|
|
ADDON_ICONS_DEFAULT_PATH = os.path.join(MEDIA_ROOT, 'img/hub')
|
|
|
|
ADDON_ICONS_DEFAULT_URL = MEDIA_URL + '/img/hub'
|
|
|
|
|
2012-02-09 15:27:26 +04:00
|
|
|
# Feature flags.
|
|
|
|
POTCH_MARKETPLACE_EXPERIMENTS = False
|
2012-03-23 04:34:34 +04:00
|
|
|
|
2012-04-03 01:27:08 +04:00
|
|
|
# JWT identifier for this marketplace.
|
|
|
|
# This is used for in-app payments in two ways.
|
|
|
|
# 1. app must send JWTs with aud (the audience) set to this exact value.
|
|
|
|
# 2. apps will receive JWTs with iss (issuer) set to this value.
|
|
|
|
INAPP_MARKET_ID = 'marketplace.mozilla.org'
|