2012-02-17 22:54:10 +04:00
|
|
|
import os
|
|
|
|
|
2012-01-18 21:11:06 +04:00
|
|
|
from lib.settings_base import *
|
|
|
|
|
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-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')
|
|
|
|
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',
|
2012-02-17 02:22:59 +04:00
|
|
|
'mkt.developers',
|
2012-02-09 15:27:26 +04:00
|
|
|
'mkt.hub',
|
|
|
|
'mkt.submit',
|
|
|
|
'mkt.experiments',
|
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-02-17 02:22:59 +04:00
|
|
|
'dev',
|
2012-02-09 15:27:26 +04:00
|
|
|
'hub',
|
|
|
|
'submit',
|
2012-02-18 06:28:11 +04:00
|
|
|
'login',
|
2012-02-23 23:44:03 +04:00
|
|
|
'privacy-policy',
|
|
|
|
'terms-of-use',
|
2012-02-24 03:59:18 +04:00
|
|
|
'users',
|
2012-02-09 15:27:26 +04:00
|
|
|
)
|
|
|
|
|
2012-02-18 03:17:57 +04:00
|
|
|
MIDDLEWARE_CLASSES += (
|
|
|
|
'amo.middleware.NoConsumerMiddleware',
|
|
|
|
)
|
|
|
|
|
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 += [
|
|
|
|
'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',
|
|
|
|
'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',
|
|
|
|
'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-02-10 06:23:37 +04:00
|
|
|
MINIFY_BUNDLES['css'].update({
|
2012-02-18 00:01:30 +04:00
|
|
|
'mkt/devreg': (
|
2012-02-18 11:43:27 +04:00
|
|
|
# TODO: Port "READ ONLY" balloon from devreg-impala/header.less.
|
2012-02-18 16:08:31 +04:00
|
|
|
# TODO: Use `hub/css/terms.less` for submission.
|
2012-02-18 11:43:27 +04:00
|
|
|
|
|
|
|
# Contains reset, clearfix, etc.
|
2012-02-21 13:34:57 +04:00
|
|
|
'css/devreg/base.css',
|
2012-02-18 11:43:27 +04:00
|
|
|
|
2012-02-18 16:08:31 +04:00
|
|
|
# Base styles (body, breadcrumbs, islands, columns).
|
2012-02-18 11:43:27 +04:00
|
|
|
'css/devreg/base.less',
|
|
|
|
|
2012-02-18 13:23:35 +04:00
|
|
|
# Typographical styles (font treatments, headings).
|
|
|
|
'css/devreg/typography.less',
|
|
|
|
|
|
|
|
# Header (aux-nav, masthead, site-nav).
|
2012-02-18 11:43:27 +04:00
|
|
|
'css/devreg/header.less',
|
|
|
|
|
2012-02-18 13:23:35 +04:00
|
|
|
# Item rows (used on Dashboard).
|
|
|
|
'css/devreg/listing.less',
|
|
|
|
'css/devreg/paginator.less',
|
|
|
|
|
2012-02-18 16:08:31 +04:00
|
|
|
# Buttons (used for paginator, "Edit" buttons, Refunds page).
|
|
|
|
'css/devreg/buttons.less',
|
|
|
|
|
2012-02-17 12:30:04 +04:00
|
|
|
# Popups, Modals, Tooltips.
|
|
|
|
'css/devreg/devhub-popups.less',
|
2012-02-19 03:59:17 +04:00
|
|
|
'css/devreg/tooltips.less',
|
2012-02-17 12:30:04 +04:00
|
|
|
|
2012-02-18 16:08:31 +04:00
|
|
|
# L10n menu ("Localize for ...").
|
|
|
|
'css/devreg/l10n.less',
|
|
|
|
|
|
|
|
# Forms (used for tables on "Manage ..." pages).
|
|
|
|
'css/devreg/devhub-forms.less',
|
|
|
|
|
2012-02-22 01:02:56 +04:00
|
|
|
# Landing page
|
|
|
|
'css/devreg/landing.less',
|
|
|
|
|
2012-02-18 16:08:31 +04:00
|
|
|
# "Manage ..." pages.
|
|
|
|
'css/devreg/manage.less',
|
2012-02-19 00:30:37 +04:00
|
|
|
'css/devreg/prose.less',
|
2012-02-17 12:30:04 +04:00
|
|
|
'css/devreg/authors.less',
|
2012-02-19 03:59:17 +04:00
|
|
|
'css/devreg/in-app-config.less',
|
|
|
|
'css/devreg/paypal.less',
|
2012-02-20 00:26:06 +04:00
|
|
|
'css/devreg/refunds.less',
|
2012-02-20 06:55:36 +04:00
|
|
|
'css/devreg/status.less',
|
2012-02-19 03:59:17 +04:00
|
|
|
|
2012-02-19 14:14:38 +04:00
|
|
|
# Image Uploads (used for "Edit Listing" Images and Submission).
|
2012-02-19 03:59:17 +04:00
|
|
|
'css/devreg/media.less',
|
2012-02-19 14:14:38 +04:00
|
|
|
|
|
|
|
# Submission.
|
2012-02-20 11:07:23 +04:00
|
|
|
'css/devreg/submit-progress.less',
|
|
|
|
'css/devreg/submit-terms.less',
|
2012-02-20 14:21:06 +04:00
|
|
|
'css/devreg/submit-manifest.less',
|
2012-02-21 14:40:42 +04:00
|
|
|
'css/devreg/submit-details.less',
|
2012-02-19 03:59:17 +04:00
|
|
|
'css/devreg/validation.less',
|
2012-02-18 11:43:27 +04:00
|
|
|
|
2012-02-20 04:21:27 +04:00
|
|
|
# Developer Log In / Registration.
|
|
|
|
'css/devreg/login.less',
|
|
|
|
|
2012-02-18 11:43:27 +04:00
|
|
|
# Footer.
|
|
|
|
'css/devreg/footer.less',
|
2012-02-17 06:22:44 +04:00
|
|
|
),
|
2012-02-18 00:01:30 +04:00
|
|
|
'mkt/devreg-legacy': (
|
2012-02-18 16:08:31 +04:00
|
|
|
'css/devreg-legacy/developers.less', # Legacy galore.
|
2012-02-17 06:22:44 +04:00
|
|
|
),
|
2012-02-09 15:27:26 +04:00
|
|
|
'hub': (
|
|
|
|
'css/impala/base.css',
|
|
|
|
'css/hub/base.less',
|
2012-02-13 12:03:49 +04:00
|
|
|
'css/hub/header.less',
|
2012-02-09 15:27:26 +04:00
|
|
|
'css/hub/forms.less',
|
2012-02-11 05:50:27 +04:00
|
|
|
'css/submit/flow.less',
|
2012-02-09 15:27:26 +04:00
|
|
|
'css/submit/terms.less',
|
|
|
|
),
|
2012-02-10 06:23:37 +04:00
|
|
|
'marketplace-experiments': (
|
|
|
|
'marketplace-experiments/css/reset.less',
|
|
|
|
'marketplace-experiments/css/site.less',
|
|
|
|
'marketplace-experiments/css/header.less',
|
|
|
|
'marketplace-experiments/css/detail.less',
|
|
|
|
'marketplace-experiments/css/buttons.less',
|
|
|
|
'marketplace-experiments/css/slider.less',
|
|
|
|
),
|
|
|
|
})
|
|
|
|
MINIFY_BUNDLES['js'].update({
|
2012-02-21 13:34:57 +04:00
|
|
|
'mkt/devreg': (
|
2012-02-17 06:22:44 +04:00
|
|
|
'js/lib/jquery-1.6.4.js',
|
|
|
|
'js/lib/underscore.js',
|
|
|
|
'js/zamboni/browser.js',
|
|
|
|
'js/amo2009/addons.js',
|
2012-02-17 10:57:14 +04:00
|
|
|
'js/devreg/init.js', # This one excludes buttons initialization, etc.
|
2012-02-17 06:22:44 +04:00
|
|
|
'js/impala/capabilities.js',
|
|
|
|
'js/zamboni/format.js',
|
|
|
|
'js/lib/jquery.cookie.js',
|
|
|
|
'js/zamboni/storage.js',
|
|
|
|
'js/zamboni/tabs.js',
|
|
|
|
|
|
|
|
# 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',
|
|
|
|
'js/lib/jquery-ui/jquery.ui.mouse.js',
|
|
|
|
'js/lib/jquery-ui/jquery.ui.autocomplete.js',
|
|
|
|
'js/lib/jquery-ui/jquery.ui.datepicker.js',
|
|
|
|
'js/lib/jquery-ui/jquery.ui.sortable.js',
|
|
|
|
|
|
|
|
'js/zamboni/truncation.js',
|
|
|
|
'js/zamboni/helpers.js',
|
|
|
|
'js/zamboni/global.js',
|
|
|
|
'js/zamboni/l10n.js',
|
|
|
|
'js/zamboni/debouncer.js',
|
|
|
|
|
|
|
|
# Users.
|
|
|
|
'js/zamboni/users.js',
|
|
|
|
|
|
|
|
# Forms.
|
|
|
|
'js/impala/forms.js',
|
|
|
|
|
|
|
|
# Login.
|
2012-02-18 00:31:10 +04:00
|
|
|
'js/zamboni/browserid_support.js',
|
2012-02-17 06:22:44 +04:00
|
|
|
'js/impala/login.js',
|
|
|
|
|
|
|
|
# Fix-up outgoing links.
|
|
|
|
'js/zamboni/outgoing_links.js',
|
|
|
|
|
|
|
|
# Stick.
|
|
|
|
'js/lib/stick.js',
|
|
|
|
|
|
|
|
# Developer Hub-specific scripts.
|
|
|
|
'js/zamboni/truncation.js',
|
|
|
|
'js/zamboni/upload.js',
|
2012-02-21 13:34:57 +04:00
|
|
|
|
|
|
|
# New stuff.
|
|
|
|
'js/devreg/devhub.js',
|
2012-02-21 14:40:42 +04:00
|
|
|
'js/devreg/submit-details.js',
|
2012-02-21 13:34:57 +04:00
|
|
|
|
2012-02-21 00:19:20 +04:00
|
|
|
# Specific stuff for making payments nicer.
|
2012-02-21 00:55:55 +04:00
|
|
|
'js/devreg/paypal.js',
|
|
|
|
'js/zamboni/validator.js',
|
2012-02-17 06:22:44 +04:00
|
|
|
),
|
2012-02-09 15:27:26 +04:00
|
|
|
'hub': (
|
2012-02-11 05:50:27 +04:00
|
|
|
'js/lib/underscore.js',
|
|
|
|
'js/marketplace-experiments/jquery-1.7.1.min.js',
|
|
|
|
'js/zamboni/browser.js',
|
|
|
|
'js/hub/init.js',
|
|
|
|
'js/impala/capabilities.js',
|
2012-02-14 02:57:51 +04:00
|
|
|
# PJAX is not ready.
|
|
|
|
#'js/lib/jquery.pjax.js',
|
2012-02-11 05:50:27 +04:00
|
|
|
'js/lib/jquery.cookie.js',
|
|
|
|
'js/zamboni/storage.js',
|
|
|
|
'js/impala/serializers.js',
|
|
|
|
|
|
|
|
# Developer Hub-specific stuff.
|
2012-02-14 02:57:51 +04:00
|
|
|
#'js/submit/flow-pjax.js',
|
2012-02-11 05:50:27 +04:00
|
|
|
'js/submit/flow.js',
|
2012-02-09 15:27:26 +04:00
|
|
|
),
|
2012-02-10 06:23:37 +04:00
|
|
|
'marketplace-experiments': (
|
|
|
|
'js/marketplace-experiments/jquery-1.7.1.min.js',
|
|
|
|
'js/marketplace-experiments/slider.js',
|
|
|
|
),
|
|
|
|
})
|
|
|
|
|
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-09 15:27:26 +04:00
|
|
|
# Feature flags.
|
|
|
|
POTCH_MARKETPLACE_EXPERIMENTS = False
|