devstack.py 4.54 KB
Newer Older
Will Daly committed
1 2 3 4
"""
Specific overrides to the base prod settings to make development easier.
"""

5
from .aws import *  # pylint: disable=wildcard-import, unused-wildcard-import
Will Daly committed
6

7 8
# Don't use S3 in devstack, fall back to filesystem
del DEFAULT_FILE_STORAGE
9
MEDIA_ROOT = "/edx/var/edxapp/uploads"
10 11


Will Daly committed
12 13 14
DEBUG = True
USE_I18N = True
TEMPLATE_DEBUG = True
15
SITE_NAME = 'localhost:8000'
Will Daly committed
16 17 18
# By default don't use a worker, execute tasks as if they were local functions
CELERY_ALWAYS_EAGER = True

19 20 21 22 23 24 25 26
################################ LOGGERS ######################################

import logging

# Disable noisy loggers
for pkg_name in ['track.contexts', 'track.middleware', 'dd.dogapi']:
    logging.getLogger(pkg_name).setLevel(logging.CRITICAL)

Will Daly committed
27 28 29 30

################################ EMAIL ########################################

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
31 32
FEATURES['ENABLE_INSTRUCTOR_EMAIL'] = True     # Enable email for all Studio courses
FEATURES['REQUIRE_COURSE_EMAIL_AUTH'] = False  # Give all courses email (don't require django-admin perms)
Will Daly committed
33 34


35 36 37 38 39
########################## ANALYTICS TESTING ########################

ANALYTICS_SERVER_URL = "http://127.0.0.1:9000/"
ANALYTICS_API_KEY = ""

40 41 42 43
# Set this to the dashboard URL in order to display the link from the
# dashboard to the Analytics Dashboard.
ANALYTICS_DASHBOARD_URL = None

44

Will Daly committed
45 46
################################ DEBUG TOOLBAR ################################

47
INSTALLED_APPS += ('debug_toolbar', 'debug_toolbar_mongo')
Will Daly committed
48 49 50 51 52
MIDDLEWARE_CLASSES += ('django_comment_client.utils.QueryCountDebugMiddleware',
                       'debug_toolbar.middleware.DebugToolbarMiddleware',)
INTERNAL_IPS = ('127.0.0.1',)

DEBUG_TOOLBAR_PANELS = (
53 54 55 56 57 58 59 60
    'debug_toolbar.panels.version.VersionDebugPanel',
    'debug_toolbar.panels.timer.TimerDebugPanel',
    'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',
    'debug_toolbar.panels.headers.HeaderDebugPanel',
    'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
    'debug_toolbar.panels.sql.SQLDebugPanel',
    'debug_toolbar.panels.signals.SignalDebugPanel',
    'debug_toolbar.panels.logger.LoggingPanel',
61
    'debug_toolbar_mongo.panel.MongoDebugPanel',
62 63 64 65 66

    #  Enabling the profiler has a weird bug as of django-debug-toolbar==0.9.4 and
    #  Django=1.3.1/1.4 where requests to views get duplicated (your method gets
    #  hit twice). So you can uncomment when you need to diagnose performance
    #  problems, but you shouldn't leave it on.
67
    #'debug_toolbar.panels.profiling.ProfilingDebugPanel',
Will Daly committed
68 69 70
)

DEBUG_TOOLBAR_CONFIG = {
71
    'INTERCEPT_REDIRECTS': False,
72
    'SHOW_TOOLBAR_CALLBACK': lambda _: True,
Will Daly committed
73 74 75 76 77 78
}

########################### PIPELINE #################################

PIPELINE_SASS_ARGUMENTS = '--debug-info --require {proj_dir}/static/sass/bourbon/lib/bourbon.rb'.format(proj_dir=PROJECT_ROOT)

79 80 81 82
########################### VERIFIED CERTIFICATES #################################

FEATURES['AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING'] = True
FEATURES['ENABLE_PAYMENT_FAKE'] = True
83

84 85 86 87 88 89 90 91 92
CC_PROCESSOR_NAME = 'CyberSource2'
CC_PROCESSOR = {
    'CyberSource2': {
        "PURCHASE_ENDPOINT": '/shoppingcart/payment_fake/',
        "SECRET_KEY": 'abcd123',
        "ACCESS_KEY": 'abcd123',
        "PROFILE_ID": 'edx',
    }
}
Will Daly committed
93

94
########################### External REST APIs #################################
95 96
FEATURES['ENABLE_OAUTH2_PROVIDER'] = True
OAUTH_OIDC_ISSUER = 'http://127.0.0.1:8000/oauth2'
97 98 99
FEATURES['ENABLE_MOBILE_REST_API'] = True
FEATURES['ENABLE_VIDEO_ABSTRACTION_LAYER_API'] = True

100 101 102 103 104 105 106 107 108
########################## SECURITY #######################
FEATURES['ENFORCE_PASSWORD_POLICY'] = False
FEATURES['ENABLE_MAX_FAILED_LOGIN_ATTEMPTS'] = False
FEATURES['SQUELCH_PII_IN_LOGS'] = False
FEATURES['PREVENT_CONCURRENT_LOGINS'] = False
FEATURES['ADVANCED_SECURITY'] = False
PASSWORD_MIN_LENGTH = None
PASSWORD_COMPLEXITY = {}

109 110 111 112 113 114 115 116 117

########################### Milestones #################################
FEATURES['MILESTONES_APP'] = True


########################### Entrance Exams #################################
FEATURES['ENTRANCE_EXAMS'] = True


118 119 120 121 122
########################## Courseware Search #######################
FEATURES['ENABLE_COURSEWARE_SEARCH'] = True
SEARCH_ENGINE = "search.elastic.ElasticSearchEngine"


Will Daly committed
123
#####################################################################
124
# See if the developer has any local overrides.
Will Daly committed
125
try:
126
    from .private import *      # pylint: disable=import-error
Will Daly committed
127 128
except ImportError:
    pass
129 130 131 132

#####################################################################
# Lastly, run any migrations, if needed.
MODULESTORE = convert_module_store_setting_if_needed(MODULESTORE)