Пример #1
0
def read_local_settings(namespace):
    try:
        import local_settings
    except ImportError:
        local_settings = None

    if local_settings:
        namespace.update(vars_in_namespace(local_settings))
        if hasattr(local_settings, "configure"):
            settings = vars_in_namespace(namespace)
            namespace.update(local_settings.configure(settings) or {})
Пример #2
0
def read_local_settings(namespace):
    try:
        import local_settings
    except ImportError:
        local_settings = None

    if local_settings:
        namespace.update(vars_in_namespace(local_settings))
        if hasattr(local_settings, "configure"):
            settings = vars_in_namespace(namespace)
            namespace.update(local_settings.configure(settings) or {})
from project.settings import *


LAYERS['layers'] = ('basic',)
SITE_ID = 2

try:
    import local_settings
    from local_settings import *
except ImportError:
    pass
else:
    if hasattr(local_settings, 'configure'):
        lcl = locals()
        di = local_settings.configure(**locals())
        lcl.update(**di)
Пример #4
0
STATIC_URL = '/static/'
####

LANGUAGE_CODE = 'ja'
TIME_ZONE = 'Asia/Tokyo'
INSTALLED_APPS += (
    'djpress',
)
STATIC_ROOT = os.path.join(BASE_DIR, 'assets/')
STATIC_URL = '/assets/'


try:
    from local_settings import configure
    configure(globals())
except:
    pass

try:
    from app import logs
    LOGGING = logs.LOGGING
except:
    pass

try:
    from app.databases import DatabaseRouter
    DATABASES.update(DatabaseRouter.confs())
    DATABASE_ROUTERS = [DatabaseRouter.router()]
except:
    pass
Пример #5
0
from .base import *

try:
    import local_settings
except ImportError:
    local_settings = None

if local_settings:
    if hasattr(local_settings, "configure"):  # Support a `configure(current_settings_dict)` function
        globals().update(local_settings.configure(globals()) or {})
    # And also copy all UPPER_CASE values here
    globals().update((setting, value) for (setting, value) in vars(local_settings).items() if setting.isupper())
Пример #6
0
# https://docs.djangoproject.com/en/1.8/howto/static-files/

STATIC_URL = "/static/"
####

LANGUAGE_CODE = "ja"
TIME_ZONE = "Asia/Tokyo"
INSTALLED_APPS += ("djpress",)
STATIC_ROOT = os.path.join(BASE_DIR, "assets/")
STATIC_URL = "/assets/"


try:
    from local_settings import configure

    configure(globals())
except:
    pass

try:
    from app import logs

    LOGGING = logs.LOGGING
except:
    pass

try:
    from app.databases import DatabaseRouter

    DATABASES.update(DatabaseRouter.confs())
    DATABASE_ROUTERS = [DatabaseRouter.router()]