addons-server/mkt/settings.py

137 строки
3.5 KiB
Python
Исходник Обычный вид История

import os
from lib.settings_base import *
from mkt import asset_bundles
# We'll soon need a `settings_test_mkt` to override this.
APP_PREVIEW = True
2012-02-18 03:24:50 +04:00
WAFFLE_TABLE_SUFFIX = 'mkt'
# So temporary. Allow us to link to new devhub URLs from `Addon.get_dev_url()`.
MARKETPLACE = True
# Pretty temporary. Set the correct home for Marketplace. Redirects are sick!
HOME = 'mkt.developers.views.home'
# 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
ROOT_URLCONF = 'mkt.urls'
INSTALLED_APPS = list(INSTALLED_APPS)
INSTALLED_APPS.remove('api')
INSTALLED_APPS.remove('compat')
INSTALLED_APPS.remove('discovery')
INSTALLED_APPS.remove('devhub')
INSTALLED_APPS = tuple(INSTALLED_APPS)
2012-02-09 15:27:26 +04:00
INSTALLED_APPS += (
'mkt.site',
'mkt.developers',
2012-02-09 15:27:26 +04:00
'mkt.submit',
'mkt.experiments',
'devhub', # Put here so helpers.py doesn't get loaded first.
2012-03-14 02:51:03 +04:00
'mkt.webapps',
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.
'app',
'dev',
2012-02-09 15:27:26 +04:00
'submit',
'login',
'privacy-policy',
'terms-of-use',
2012-02-24 03:59:18 +04:00
'users',
2012-02-09 15:27:26 +04:00
)
MIDDLEWARE_CLASSES += (
'amo.middleware.NoConsumerMiddleware',
)
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',
'mkt.site.context_processors.global_settings',
'mkt.experiments.context_processors.fragment',
]
2012-02-14 12:56:35 +04:00
2012-02-15 01:22:46 +04:00
# Tests.
NOSE_ARGS = [
'--with-fixture-bundling',
'--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',
'users.views.edit',
2012-02-09 04:58:04 +04:00
'users.views.purchases',
'users.views.payments',
'search.views',
'sharing.views',
'tags.views',
'versions.views',
'webapps.views',
)
# 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.
MINIFY_BUNDLES['css'].update(asset_bundles.CSS)
MINIFY_BUNDLES['js'].update(asset_bundles.JS)
2012-02-10 06:23:37 +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'},
})
# 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