__author__ = 'cenk'

from .common import *

SECRET_KEY = SECRET_KEY

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

TEMPLATE_DEBUG = DEBUG
TEMPLATES_ROOT = 'sfseed/src'

# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases

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

if TESTING:  # Covers regular testing and django-coverage
    if USING_CELERY:
        from celery import current_app

        BROKER_BACKEND = 'memory'
        CELERY_ALWAYS_EAGER = True
        current_app.conf.CELERY_ALWAYS_EAGER = True
        CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
        current_app.conf.CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
        INSTALLED_APPS += (
            "tests",
        )
