Commit 172c6d15 by Julia Hansbrough

Merge pull request #3905 from edx/flowerhack/change-hardcoded-defaults

Moved hardcoded defaults into settings
parents 7cb241b8 0d854bd5
......@@ -18,7 +18,7 @@ from path import path
from warnings import filterwarnings
# import settings from LMS for consistent behavior with CMS
from lms.envs.test import (WIKI_ENABLED)
from lms.envs.test import (WIKI_ENABLED, PLATFORM_NAME, SITE_NAME)
# Nose Test Runner
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
......
......@@ -127,6 +127,8 @@ if STATIC_URL_BASE:
PLATFORM_NAME = ENV_TOKENS.get('PLATFORM_NAME', PLATFORM_NAME)
# For displaying on the receipt. At Stanford PLATFORM_NAME != MERCHANT_NAME, but PLATFORM_NAME is a fine default
PLATFORM_TWITTER_ACCOUNT = ENV_TOKENS.get('PLATFORM_TWITTER_ACCOUNT', PLATFORM_TWITTER_ACCOUNT)
PLATFORM_FACEBOOK_ACCOUNT = ENV_TOKENS.get('PLATFORM_FACEBOOK_ACCOUNT', PLATFORM_FACEBOOK_ACCOUNT)
CC_MERCHANT_NAME = ENV_TOKENS.get('CC_MERCHANT_NAME', PLATFORM_NAME)
EMAIL_BACKEND = ENV_TOKENS.get('EMAIL_BACKEND', EMAIL_BACKEND)
EMAIL_FILE_PATH = ENV_TOKENS.get('EMAIL_FILE_PATH', None)
......@@ -170,6 +172,10 @@ TECH_SUPPORT_EMAIL = ENV_TOKENS.get('TECH_SUPPORT_EMAIL', TECH_SUPPORT_EMAIL)
CONTACT_EMAIL = ENV_TOKENS.get('CONTACT_EMAIL', CONTACT_EMAIL)
BUGS_EMAIL = ENV_TOKENS.get('BUGS_EMAIL', BUGS_EMAIL)
PAYMENT_SUPPORT_EMAIL = ENV_TOKENS.get('PAYMENT_SUPPORT_EMAIL', PAYMENT_SUPPORT_EMAIL)
UNIVERSITY_EMAIL = ENV_TOKENS.get('UNIVERSITY_EMAIL', UNIVERSITY_EMAIL)
PRESS_EMAIL = ENV_TOKENS.get('PRESS_EMAIL', PRESS_EMAIL)
# Currency
PAID_COURSE_REGISTRATION_CURRENCY = ENV_TOKENS.get('PAID_COURSE_REGISTRATION_CURRENCY',
PAID_COURSE_REGISTRATION_CURRENCY)
......
......@@ -37,8 +37,10 @@ from lms.lib.xblock.mixin import LmsBlockMixin
################################### FEATURES ###################################
# The display name of the platform to be used in templates/emails/etc.
PLATFORM_NAME = "edX"
PLATFORM_NAME = "Your Platform Name Here"
CC_MERCHANT_NAME = PLATFORM_NAME
PLATFORM_TWITTER_ACCOUNT = "@YourPlatformTwitterAccount"
PLATFORM_FACEBOOK_ACCOUNT = "http://www.facebook.com/YourPlatformFacebookAccount"
COURSEWARE_ENABLED = True
ENABLE_JASMINE = False
......@@ -523,7 +525,7 @@ CMS_BASE = 'localhost:8001'
# Site info
SITE_ID = 1
SITE_NAME = "edx.org"
SITE_NAME = "example.com"
HTTPS = 'on'
ROOT_URLCONF = 'lms.urls'
# NOTE: Please set ALLOWED_HOSTS to some sane value, as we do not allow the default '*'
......@@ -536,6 +538,8 @@ SERVER_EMAIL = 'devops@example.com'
TECH_SUPPORT_EMAIL = 'technical@example.com'
CONTACT_EMAIL = 'info@example.com'
BUGS_EMAIL = 'bugs@example.com'
UNIVERSITY_EMAIL = 'university@example.com'
PRESS_EMAIL = 'press@example.com'
ADMINS = ()
MANAGERS = ADMINS
......
......@@ -287,6 +287,9 @@ FEATURES['CLASS_DASHBOARD'] = True
import openid.oidutil
openid.oidutil.log = lambda message, level = 0: None
PLATFORM_NAME = "edX"
SITE_NAME = "edx.org"
# set up some testing for microsites
MICROSITE_CONFIGURATION = {
"test_microsite": {
......
......@@ -28,10 +28,10 @@
'discussion on our {fb_link_start}facebook page{fb_link_end}. Though we may '
'not have a chance to respond to every email, we take all feedback into consideration.').format(
platform_name=settings.PLATFORM_NAME,
contact_email=u'<a href="mailto:{0}">{0}</a>'.format(settings.CONTACT_EMAIL),
contact_email=u'<a href="mailto:{email}">{email}</a>'.format(email=settings.CONTACT_EMAIL),
faq_link_start=u'<a href="{url}">'.format(url=reverse('faq_edx')),
faq_link_end='</a>',
fb_link_start='<a href="http://www.facebook.com/EdxOnline">',
fb_link_start='<a href="{url}">'.format(url=settings.PLATFORM_FACEBOOK_ACCOUNT),
fb_link_end='</a>'
)}
</p>
......@@ -54,13 +54,13 @@
<p>${_('Please visit our {link_start}media/press page{link_end} for more information. For any media or press inquiries, please email {email}.').format(
link_start=u'<a href="{url}">'.format(url=reverse('faq_edx')),
link_end='</a>',
email=u'<a href="mailto:press@edx.org">press@edx.org</a>',
email=u'<a href="mailto:{email}">{email}/a>'.format(email=settings.PRESS_EMAIL),
)}</p>
<h2>${_("Universities")}</h2>
<p>
${_('If you are a university wishing to collaborate with or if you have questions about {platform_name}, please email {email}.').format(
email=u'<a href="mailto:university@edx.org">university@edx.org</a>',
email=u'<a href="mailto:{url}">{url}</a>'.format(url=settings.UNIVERSITY_EMAIL),
platform_name=settings.PLATFORM_NAME
)}
</p>
......
......@@ -238,15 +238,15 @@
</a>
% else:
<%
site_domain = microsite.get_value('site_domain', 'www.edx.org')
platform_name = microsite.get_value('platform_name', 'edX')
site_domain = microsite.get_value('site_domain', settings.SITE_NAME)
platform_name = microsite.get_value('platform_name', settings.PLATFORM_NAME)
# Translators: This text will be automatically posted to the student's
# Twitter account. {url} should appear at the end of the text.
tweet_text = _("I just registered for {number} {title} through {account}: {url}").format(
number=course.number,
title=get_course_about_section(course, 'title'),
account=microsite.get_value('course_about_twitter_account', '@edxonline'),
account=microsite.get_value('course_about_twitter_account', settings.PLATFORM_TWITTER_ACCOUNT),
url=u"http://{domain}{path}".format(
domain=site_domain,
path=reverse('about_course', args=[course.id.to_deprecated_string()])
......@@ -254,7 +254,7 @@
).replace(u" ", u"+")
tweet_action = u"http://twitter.com/intent/tweet?text={tweet_text}".format(tweet_text=tweet_text)
facebook_link = microsite.get_value('course_about_facebook_link', 'http://www.facebook.com/EdxOnline')
facebook_link = microsite.get_value('course_about_facebook_link', settings.PLATFORM_FACEBOOK_ACCOUNT)
email_subject = u"mailto:?subject={subject}&body={body}".format(
subject=_("Take a course with {platform} online").format(platform=platform_name),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment