dev.py 1.29 KB
Newer Older
1 2 3 4 5 6 7 8
"""
This config file runs the simplest dev environment"""

from .common import *

DEBUG = True
TEMPLATE_DEBUG = DEBUG

9
KEYSTORE = {
10 11 12 13 14
    'default': {
        'host': 'localhost',
        'db': 'mongo_base',
        'collection': 'key_store',
    }
15 16
}

17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': ENV_ROOT / "db" / "mitx.db",
    }
}

CACHES = {
    # This is the cache used for most things. Askbot will not work without a 
    # 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,
43
        'KEY_FUNCTION': 'util.memcache.safe_key',
44 45
    }
}