dev_ike.py 2.33 KB
Newer Older
1 2 3 4 5 6 7 8 9
"""
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
        /mitx # The location of this repo
        /log  # Where we're going to write log files
"""
10 11
from .common import *
from .logsettings import get_logger_config
12
from .dev import *
13
import socket
14

15 16 17
WIKI_ENABLED = False
MITX_FEATURES['ENABLE_TEXTBOOK'] = False
MITX_FEATURES['ENABLE_DISCUSSION'] = False
18
MITX_FEATURES['ACCESS_REQUIRE_STAFF_FOR_COURSE'] = True	  # require that user be in the staff_* group to be able to enroll
19 20
MITX_FEATURES['SUBDOMAIN_COURSE_LISTINGS'] = False
MITX_FEATURES['SUBDOMAIN_BRANDING'] = False
21
MITX_FEATURES['FORCE_UNIVERSITY_DOMAIN'] = None		# show all university courses if in dev (ie don't use HTTP_HOST)
ichuang committed
22

23
MITX_FEATURES['DISABLE_START_DATES'] = True
24
# MITX_FEATURES['USE_DJANGO_PIPELINE']=False      # don't recompile scss
25

26 27 28
myhost = socket.gethostname()
if ('edxvm' in myhost) or ('ocw' in myhost):
    MITX_FEATURES['DISABLE_LOGIN_BUTTON'] = True	# auto-login with MIT certificate
29
    MITX_FEATURES['USE_XQA_SERVER'] = 'https://qisx.mit.edu/xqa'	# needs to be ssl or browser blocks it
30
    MITX_FEATURES['USE_DJANGO_PIPELINE']=False      # don't recompile scss
31

32 33 34
if ('ocw' in myhost):
    MITX_FEATURES['ACCESS_REQUIRE_STAFF_FOR_COURSE'] = False

35 36 37
if ('domU' in myhost):
    EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
    MITX_FEATURES['REROUTE_ACTIVATION_EMAIL'] = 'ichuang@mitx.mit.edu'	# nonempty string = address for all activation emails
38
    MITX_FEATURES['USE_DJANGO_PIPELINE']=False      # don't recompile scss
39

40 41
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https')	# django 1.4 for nginx ssl proxy

42 43 44 45 46
#-----------------------------------------------------------------------------
# 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') ])
47 48 49 50 51 52
#TEMPLATE_LOADERS = tuple([ app for app in TEMPLATE_LOADERS if not app.startswith('askbot') ])
#TEMPLATE_LOADERS = tuple([ app for app in TEMPLATE_LOADERS if not app.startswith('mitxmako') ])
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
    )