Commit d2786a64 by Sarina Canelake

Merge pull request #7181 from stvstnfrd/debt/envs

Remove old env settings files
parents a35264af 261629d7
......@@ -80,10 +80,22 @@ FEATURES = {
## Doing so will cause all courses to be released on production
'DISABLE_START_DATES': False, # When True, all courses will be active, regardless of start date
# When True, will only publicly list courses by the subdomain. Expects you
# to define COURSE_LISTINGS, a dictionary mapping subdomains to lists of
# course_ids (see dev_int.py for an example)
# When True, will only publicly list courses by the subdomain.
'SUBDOMAIN_COURSE_LISTINGS': False,
# Expects you to define COURSE_LISTINGS, a dictionary mapping
# subdomains to lists of course_ids
# COURSE_LISTINGS = {
# 'default': [
# 'BerkeleyX/CS169.1x/2012_Fall',
# 'HarvardX/CS50x/2012',
# 'MITx/3.091x/2012_Fall',
# ],
# 'openedx': [
# 'BerkeleyX/CS169.1x/2012_Fall',
# ],
# }
# To see it in action, add the following to your /etc/hosts file:
# 127.0.0.1 openedx.dev
# When True, will override certain branding with university specific values
# Expects a SUBDOMAIN_BRANDING dictionary that maps the subdomain to the
......
"""
This config file runs the simplest dev environment using sqlite, and db-based
sessions. Assumes structure:
/envroot/
/db # This is where it'll write the database file
/edx-platform # The location of this repo
/log # Where we're going to write log files
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
from .common import *
from .dev import *
import socket
WIKI_ENABLED = False
FEATURES['ENABLE_TEXTBOOK'] = False
FEATURES['ACCESS_REQUIRE_STAFF_FOR_COURSE'] = True # require that user be in the staff_* group to be able to enroll
FEATURES['SUBDOMAIN_COURSE_LISTINGS'] = False
FEATURES['SUBDOMAIN_BRANDING'] = False
FEATURES['FORCE_UNIVERSITY_DOMAIN'] = None # show all university courses if in dev (ie don't use HTTP_HOST)
FEATURES['DISABLE_START_DATES'] = True
# FEATURES['USE_DJANGO_PIPELINE']=False # don't recompile scss
myhost = socket.gethostname()
if ('edxvm' in myhost) or ('ocw' in myhost):
FEATURES['DISABLE_LOGIN_BUTTON'] = True # auto-login with MIT certificate
FEATURES['USE_XQA_SERVER'] = 'https://qisx.mit.edu/xqa' # needs to be ssl or browser blocks it
FEATURES['USE_DJANGO_PIPELINE'] = False # don't recompile scss
if ('ocw' in myhost):
FEATURES['ACCESS_REQUIRE_STAFF_FOR_COURSE'] = False
if ('domU' in myhost):
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
FEATURES['REROUTE_ACTIVATION_EMAIL'] = 'ichuang@edX.mit.edu' # nonempty string = address for all activation emails
FEATURES['USE_DJANGO_PIPELINE'] = False # don't recompile scss
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https') # django 1.4 for nginx ssl proxy
#-----------------------------------------------------------------------------
# disable django debug toolbars
INSTALLED_APPS = tuple([app for app in INSTALLED_APPS if not app.startswith('debug_toolbar')])
MIDDLEWARE_CLASSES = tuple([mcl for mcl in MIDDLEWARE_CLASSES if not mcl.startswith('debug_toolbar')])
#TEMPLATE_LOADERS = tuple([ app for app in TEMPLATE_LOADERS if not app.startswith('edxmako') ])
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
"""
This enables use of course listings by subdomain. To see it in action, point the
following domains to 127.0.0.1 in your /etc/hosts file:
berkeley.dev
harvard.dev
mit.dev
Note that OS X has a bug where using *.local domains is excruciatingly slow, so
use *.dev domains instead for local testing.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
from .dev import *
FEATURES['SUBDOMAIN_COURSE_LISTINGS'] = True
COURSE_LISTINGS = {
'default': ['BerkeleyX/CS169.1x/2012_Fall',
'BerkeleyX/CS188.1x/2012_Fall',
'HarvardX/CS50x/2012',
'HarvardX/PH207x/2012_Fall',
'MITx/3.091x/2012_Fall',
'MITx/6.002x/2012_Fall',
'MITx/6.00x/2012_Fall'],
'berkeley': ['BerkeleyX/CS169.1x/2012_Fall',
'BerkeleyX/CS188.1x/2012_Fall'],
'harvard': ['HarvardX/CS50x/2012'],
'mit': ['MITx/3.091x/2012_Fall',
'MITx/6.00x/2012_Fall']
}
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
from ..dev import *
CLASSES_TO_DBS = {
'BerkeleyX/CS169.1x/2012_Fall': "cs169.db",
'BerkeleyX/CS188.1x/2012_Fall': "cs188_1.db",
'HarvardX/CS50x/2012': "cs50.db",
'HarvardX/PH207x/2012_Fall': "ph207.db",
'MITx/3.091x/2012_Fall': "3091.db",
'MITx/6.002x/2012_Fall': "6002.db",
'MITx/6.00x/2012_Fall': "600.db",
}
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
'KEY_FUNCTION': 'util.memcache.safe_key',
},
'general': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
'KEY_PREFIX': 'general',
'VERSION': 5,
'KEY_FUNCTION': 'util.memcache.safe_key',
}
}
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
def path_for_db(db_name):
return ENV_ROOT / "db" / db_name
def course_db_for(course_id):
db_name = CLASSES_TO_DBS[course_id]
return {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': path_for_db(db_name)
}
}
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
from .courses import *
DATABASES = course_db_for('HarvardX/CS50x/2012')
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
from .courses import *
DATABASES = course_db_for('MITx/6.002x/2012_Fall')
"""
Note that for this to work at all, you must have memcached running (or you won't
get shared sessions)
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
from lms.envs.devgroups.courses import *
# Move this to a shared file later:
for class_id, db_name in CLASSES_TO_DBS.items():
DATABASES[class_id] = {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': path_for_db(db_name)
}
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
# Settings for edx4edx production instance
from .aws import *
COURSE_NAME = "edx4edx"
COURSE_NUMBER = "edX.01"
COURSE_TITLE = "edx4edx: edX Author Course"
EDX4EDX_ROOT = ENV_ROOT / "data/edx4edx"
### Dark code. Should be enabled in local settings for devel.
ENABLE_MULTICOURSE = True # set to False to disable multicourse display (see lib.util.views.edxhome)
###
PIPELINE_CSS_COMPRESSOR = None
PIPELINE_JS_COMPRESSOR = None
COURSE_DEFAULT = 'edx4edx'
COURSE_SETTINGS = {
'edx4edx': {
'number': 'edX.01',
'title': 'edx4edx: edX Author Course',
'xmlpath': '/edx4edx/',
'github_url': 'https://github.com/MITx/edx4edx',
'active': True,
'default_chapter': 'Introduction',
'default_section': 'edx4edx_Course',
},
}
STATICFILES_DIRS = [
PROJECT_ROOT / "static",
("edx4edx", EDX4EDX_ROOT / "html"),
("circuits", DATA_DIR / "images"),
("handouts", DATA_DIR / "handouts"),
("subs", DATA_DIR / "subs"),
# This is how you would use the textbook images locally
# ("book", ENV_ROOT / "book_images"),
]
MAKO_TEMPLATES['course'] = [DATA_DIR, EDX4EDX_ROOT]
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