dev.py 3.11 KB
Newer Older
1 2 3 4
"""
This config file runs the simplest dev environment"""

from .common import *
5
from logsettings import get_logger_config
6

7 8 9
import logging
import sys

10 11
DEBUG = True
TEMPLATE_DEBUG = DEBUG
Victor Shnayder committed
12 13 14
LOGGING = get_logger_config(ENV_ROOT / "log",
                            logging_env="dev",
                            tracking_filename="tracking.log",
15
                            dev_env = True,
Victor Shnayder committed
16 17
                            debug=True)

18 19 20 21 22 23 24 25 26
modulestore_options = {
    'default_class': 'xmodule.raw_module.RawDescriptor',
    'host': 'localhost',
    'db': 'xmodule',
    'collection': 'modulestore',
    'fs_root': GITHUB_REPO_ROOT,
    'render_template': 'mitxmako.shortcuts.render_to_string',
}

27
MODULESTORE = {
28
    'default': {
29 30 31 32
        'ENGINE': 'xmodule.modulestore.mongo.DraftMongoModuleStore',
        'OPTIONS': modulestore_options
    },
    'direct': {
33
        'ENGINE': 'xmodule.modulestore.mongo.MongoModuleStore',
34
        'OPTIONS': modulestore_options
35
    }
36 37
}

38 39 40 41 42 43 44 45 46 47 48
# cdodge: This is the specifier for the MongoDB (using GridFS) backed static content store
# This is for static content for courseware, not system static content (e.g. javascript, css, edX branding, etc)
CONTENTSTORE = {
    'ENGINE': 'xmodule.contentstore.mongo.MongoContentStore',
    'OPTIONS': {
        'host': 'localhost',
        'db' : 'xcontent',
    }
}


49 50 51
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
52
        'NAME': ENV_ROOT / "db" / "mitx.db",
53 54 55
    }
}

56
LMS_BASE = "localhost:8000"
57

58 59
REPOS = {
    'edx4edx': {
60
        'branch': 'master',
61 62
        'origin': 'git@github.com:MITx/edx4edx.git',
    },
63 64
    'content-mit-6002x': {
        'branch': 'master',
65 66
        #'origin': 'git@github.com:MITx/6002x-fall-2012.git',
        'origin': 'git@github.com:MITx/content-mit-6002x.git',
67 68
    },
    '6.00x': {
69
        'branch': 'master',
70 71 72
        'origin': 'git@github.com:MITx/6.00x.git',
    },
    '7.00x': {
73
        'branch': 'master',
74 75 76
        'origin': 'git@github.com:MITx/7.00x.git',
    },
    '3.091x': {
77
        'branch': 'master',
78 79
        'origin': 'git@github.com:MITx/3.091x.git',
    },
80 81
}

82
CACHES = {
83
    # This is the cache used for most things. Askbot will not work without a
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
    # functioning cache -- it relies on caching to load its settings in places.
    # In staging/prod envs, the sessions also live here.
    'default': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
        'LOCATION': 'mitx_loc_mem_cache',
        'KEY_FUNCTION': 'util.memcache.safe_key',
    },

    # The general cache is what you get if you use our util.cache. It's used for
    # things like caching the course.xml file for different A/B test groups.
    # We set it to be a DummyCache to force reloading of course.xml in dev.
    # In staging environments, we would grab VERSION from data uploaded by the
    # push process.
    'general': {
        'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
        'KEY_PREFIX': 'general',
        'VERSION': 4,
101
        'KEY_FUNCTION': 'util.memcache.safe_key',
102 103
    }
}
104 105 106

# Make the keyedcache startup warnings go away
CACHE_TIMEOUT = 0
107 108 109

# Dummy secret key for dev
SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd'