Newer
Older
'course_wiki.plugins.markdownedx',
# For A/B testing
'waffle',
# For testing
'django.contrib.admin', # only used in DEBUG mode
Ned Batchelder
committed
'debug',
'django_comment_common',
# Monitoring
'datadog',
# User API
'rest_framework',
'user_api',
# Notification preferences setting
'notification_prefs',
# Student Identity Verification
'verify_student',
######################### MARKETING SITE ###############################
EDXMKTG_COOKIE_NAME = 'edxloggedin'
MKTG_URL_LINK_MAP = {
'ABOUT': 'about_edx',
'CONTACT': 'contact',
'FAQ': 'help_edx',
'COURSES': 'courses',
'ROOT': 'root',
'TOS': 'tos',
'HONOR': 'honor',
'PRIVACY': 'privacy_edx',
'JOBS': 'jobs',
'PRESS': 'press',
'WHAT_IS_VERIFIED_CERT': 'verified-certificate',
Chris Dodge
committed
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
############################### MICROSITES ################################
def enable_microsites(microsite_config_dict, subdomain_branding, virtual_universities, microsites_root=ENV_ROOT / "microsites"):
"""
Enable the use of microsites, which are websites that allow
for subdomains for the edX platform, e.g. foo.edx.org
"""
if not microsite_config_dict:
return
FEATURES['USE_MICROSITES'] = True
for microsite_name in microsite_config_dict.keys():
# Calculate the location of the microsite's files
microsite_root = microsites_root / microsite_name
microsite_config = microsite_config_dict[microsite_name]
# pull in configuration information from each
# microsite root
if os.path.isdir(microsite_root):
# store the path on disk for later use
microsite_config['microsite_root'] = microsite_root
# get the domain that this should reside
domain = microsite_config['domain_prefix']
# get the virtual university that this should use
university = microsite_config['university']
# add to the existing maps in our settings
subdomain_branding[domain] = university
virtual_universities.append(university)
template_dir = microsite_root / 'templates'
microsite_config['template_dir'] = template_dir
microsite_config['microsite_name'] = microsite_name
else:
# not sure if we have application logging at this stage of
# startup
print '**** Error loading microsite {0}. Directory does not exist'.format(microsite_root)
# remove from our configuration as it is not valid
del microsite_config_dict[microsite_name]
# if we have microsites, then let's turn on SUBDOMAIN_BRANDING
# Note check size of the dict because some microsites might not be found on disk and
# we could be left with none
if microsite_config_dict:
FEATURES['SUBDOMAIN_BRANDING'] = True
TEMPLATE_DIRS.append(microsites_root)
MAKO_TEMPLATES['main'].append(microsites_root)
STATICFILES_DIRS.append(microsites_root)
################# Student Verification #################
VERIFY_STUDENT = {
"DAYS_GOOD_FOR": 365, # How many days is a verficiation good for?
######################## CAS authentication ###########################
if FEATURES.get('AUTH_USE_CAS'):
CAS_SERVER_URL = 'https://provide_your_cas_url_here'
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'django_cas.backends.CASBackend',
INSTALLED_APPS += ('django_cas',)
MIDDLEWARE_CLASSES += ('django_cas.middleware.CASMiddleware',)
###################### Registration ##################################
# Remove some of the fields from the list to not display them
REGISTRATION_OPTIONAL_FIELDS = set([
'level_of_education',
'gender',
'year_of_birth',
'mailing_address',
'goals',
])
David Ormsbee
committed
###################### Grade Downloads ######################
David Ormsbee
committed
GRADES_DOWNLOAD_ROUTING_KEY = HIGH_MEM_QUEUE
GRADES_DOWNLOAD = {
'STORAGE_TYPE': 'localfs',
'BUCKET': 'edx-grades',
'ROOT_PATH': '/tmp/edx-s3/grades',
David Ormsbee
committed
}
##################### LinkedIn #####################
INSTALLED_APPS += ('django_openid_auth',)
############################ LinkedIn Integration #############################
INSTALLED_APPS += ('linkedin',)
LINKEDIN_API = {
'EMAIL_WHITELIST': [],
'COMPANY_ID': '2746406',
}