settings.py 1.21 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
import os

BASE_DIR = os.path.dirname(os.path.abspath(__file__))

SECRET_KEY = 'notsecret'

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'test.db'),
    }
}

INSTALLED_APPS = (
Jamesie Pic's avatar
Jamesie Pic committed
15 16
    'django.contrib.staticfiles',
    'rest_framework',
17 18 19 20 21 22 23 24 25
    'representatives',
    'representatives_votes',
)

DEBUG = True
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
ROOT_URLCONF = 'representatives_votes.tests.urls'

Jamesie Pic's avatar
Jamesie Pic committed
26
STATIC_URL = '/static/'
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
USE_I18N = True
USE_L10N = True
USE_TZ = True

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
        'simple': {
            'format': '%(levelname)s[%(module)s]: %(message)s'
        },
    },
    'handlers': {
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
            'formatter': 'simple'
        },
    },
    'loggers': {
        'django': {
            'handlers': ['console'],
            'level': 'INFO'
        },
        'representatives': {
            'handlers': ['console'],
            'level': 'DEBUG'
        },
        'representatives_votes': {
            'handlers': ['console'],
            'level': 'DEBUG'
        },
    },
}