Commit 0d854bd5 by Julia Hansbrough

Moved hardcoded defaults into settings

parent 779480ba
...@@ -18,7 +18,7 @@ from path import path ...@@ -18,7 +18,7 @@ from path import path
from warnings import filterwarnings from warnings import filterwarnings
# import settings from LMS for consistent behavior with CMS # 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 # Nose Test Runner
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
......
...@@ -127,6 +127,8 @@ if STATIC_URL_BASE: ...@@ -127,6 +127,8 @@ if STATIC_URL_BASE:
PLATFORM_NAME = ENV_TOKENS.get('PLATFORM_NAME', PLATFORM_NAME) 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 # 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) CC_MERCHANT_NAME = ENV_TOKENS.get('CC_MERCHANT_NAME', PLATFORM_NAME)
EMAIL_BACKEND = ENV_TOKENS.get('EMAIL_BACKEND', EMAIL_BACKEND) EMAIL_BACKEND = ENV_TOKENS.get('EMAIL_BACKEND', EMAIL_BACKEND)
EMAIL_FILE_PATH = ENV_TOKENS.get('EMAIL_FILE_PATH', None) 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) ...@@ -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) CONTACT_EMAIL = ENV_TOKENS.get('CONTACT_EMAIL', CONTACT_EMAIL)
BUGS_EMAIL = ENV_TOKENS.get('BUGS_EMAIL', BUGS_EMAIL) BUGS_EMAIL = ENV_TOKENS.get('BUGS_EMAIL', BUGS_EMAIL)
PAYMENT_SUPPORT_EMAIL = ENV_TOKENS.get('PAYMENT_SUPPORT_EMAIL', PAYMENT_SUPPORT_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 = ENV_TOKENS.get('PAID_COURSE_REGISTRATION_CURRENCY',
PAID_COURSE_REGISTRATION_CURRENCY) PAID_COURSE_REGISTRATION_CURRENCY)
......
...@@ -37,8 +37,10 @@ from lms.lib.xblock.mixin import LmsBlockMixin ...@@ -37,8 +37,10 @@ from lms.lib.xblock.mixin import LmsBlockMixin
################################### FEATURES ################################### ################################### FEATURES ###################################
# The display name of the platform to be used in templates/emails/etc. # 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 CC_MERCHANT_NAME = PLATFORM_NAME
PLATFORM_TWITTER_ACCOUNT = "@YourPlatformTwitterAccount"
PLATFORM_FACEBOOK_ACCOUNT = "http://www.facebook.com/YourPlatformFacebookAccount"
COURSEWARE_ENABLED = True COURSEWARE_ENABLED = True
ENABLE_JASMINE = False ENABLE_JASMINE = False
...@@ -523,7 +525,7 @@ CMS_BASE = 'localhost:8001' ...@@ -523,7 +525,7 @@ CMS_BASE = 'localhost:8001'
# Site info # Site info
SITE_ID = 1 SITE_ID = 1
SITE_NAME = "edx.org" SITE_NAME = "example.com"
HTTPS = 'on' HTTPS = 'on'
ROOT_URLCONF = 'lms.urls' ROOT_URLCONF = 'lms.urls'
# NOTE: Please set ALLOWED_HOSTS to some sane value, as we do not allow the default '*' # 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' ...@@ -536,6 +538,8 @@ SERVER_EMAIL = 'devops@example.com'
TECH_SUPPORT_EMAIL = 'technical@example.com' TECH_SUPPORT_EMAIL = 'technical@example.com'
CONTACT_EMAIL = 'info@example.com' CONTACT_EMAIL = 'info@example.com'
BUGS_EMAIL = 'bugs@example.com' BUGS_EMAIL = 'bugs@example.com'
UNIVERSITY_EMAIL = 'university@example.com'
PRESS_EMAIL = 'press@example.com'
ADMINS = () ADMINS = ()
MANAGERS = ADMINS MANAGERS = ADMINS
......
...@@ -287,6 +287,9 @@ FEATURES['CLASS_DASHBOARD'] = True ...@@ -287,6 +287,9 @@ FEATURES['CLASS_DASHBOARD'] = True
import openid.oidutil import openid.oidutil
openid.oidutil.log = lambda message, level = 0: None openid.oidutil.log = lambda message, level = 0: None
PLATFORM_NAME = "edX"
SITE_NAME = "edx.org"
# set up some testing for microsites # set up some testing for microsites
MICROSITE_CONFIGURATION = { MICROSITE_CONFIGURATION = {
"test_microsite": { "test_microsite": {
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
'discussion on our {fb_link_start}facebook page{fb_link_end}. Though we may ' '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( 'not have a chance to respond to every email, we take all feedback into consideration.').format(
platform_name=settings.PLATFORM_NAME, 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_start=u'<a href="{url}">'.format(url=reverse('faq_edx')),
faq_link_end='</a>', 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>' fb_link_end='</a>'
)} )}
</p> </p>
...@@ -54,13 +54,13 @@ ...@@ -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( <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_start=u'<a href="{url}">'.format(url=reverse('faq_edx')),
link_end='</a>', 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> )}</p>
<h2>${_("Universities")}</h2> <h2>${_("Universities")}</h2>
<p> <p>
${_('If you are a university wishing to collaborate with or if you have questions about {platform_name}, please email {email}.').format( ${_('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 platform_name=settings.PLATFORM_NAME
)} )}
</p> </p>
......
...@@ -238,15 +238,15 @@ ...@@ -238,15 +238,15 @@
</a> </a>
% else: % else:
<% <%
site_domain = microsite.get_value('site_domain', 'www.edx.org') site_domain = microsite.get_value('site_domain', settings.SITE_NAME)
platform_name = microsite.get_value('platform_name', 'edX') platform_name = microsite.get_value('platform_name', settings.PLATFORM_NAME)
# Translators: This text will be automatically posted to the student's # Translators: This text will be automatically posted to the student's
# Twitter account. {url} should appear at the end of the text. # Twitter account. {url} should appear at the end of the text.
tweet_text = _("I just registered for {number} {title} through {account}: {url}").format( tweet_text = _("I just registered for {number} {title} through {account}: {url}").format(
number=course.number, number=course.number,
title=get_course_about_section(course, 'title'), 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( url=u"http://{domain}{path}".format(
domain=site_domain, domain=site_domain,
path=reverse('about_course', args=[course.id.to_deprecated_string()]) path=reverse('about_course', args=[course.id.to_deprecated_string()])
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
).replace(u" ", u"+") ).replace(u" ", u"+")
tweet_action = u"http://twitter.com/intent/tweet?text={tweet_text}".format(tweet_text=tweet_text) 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( email_subject = u"mailto:?subject={subject}&body={body}".format(
subject=_("Take a course with {platform} online").format(platform=platform_name), 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