<commit_before>import os
from os.path import dirname, join

import core
from core import filebrowser, pbm, admin
from core.settings.local import MY_SECRET_KEY, LOG_ROOT

ALLOWED_HOSTS = [
    ### cern.ch
    '.cern.ch',  # Allow domain and subdomains
    '.cern.ch.',  # Also allow FQDN and subdomains
    ### bigpanda.cern.ch
    'bigpanda.cern.ch',  # Allow domain and subdomains
    'bigpanda.cern.ch.',  # Also allow FQDN and subdomains
    ### pandawms.org
    '.pandawms.org',  # Allow domain and subdomains
    '.pandawms.org.',  # Also allow FQDN and subdomains

    '127.0.0.1', '.localhost'
]

### VIRTUALENV
VIRTUALENV_PATH = '/data/virtualenv37'

### WSGI
#WSGI_PATH = VIRTUALENV_PATH + '/pythonpath'

### DB_ROUTERS for atlas's prodtask
DATABASE_ROUTERS = [
    'core.dbrouter.ProdMonDBRouter',
    'core.pbm.dbrouter.PandaBrokerageMonDBRouter',
]

# name spaces of DB tables per application
DATABASE_NAME_SPACES = {
    'bigpandamon': 'ATLAS_PANDABIGMON',
    'pandajob': 'ATLAS_PANDA',
    'pandaarchjob': 'ATLAS_PANDAARCH',
    'schedresource': 'ATLAS_PANDAMETA',
    'harvester': 'ATLAS_PANDA',
    'jedi': 'ATLAS_PANDA',
    'prodsys': 'ATLAS_DEFT',
}

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

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [
            join(dirname(core.__file__), 'templates'),
            join(dirname(admin.__file__), 'templates'),
            join(dirname(core.__file__), 'templates'),
            join(dirname(core.filebrowser.__file__), 'templates'),
            join(dirname(core.pbm.__file__), 'templates'),
        ],
        'OPTIONS': {
            'context_processors': [
                # Insert your TEMPLATE_CONTEXT_PROCESSORS here or use this
                # list if you haven't customized them:
                'django.contrib.auth.context_processors.auth',
                'django.template.context_processors.debug',
                'django.template.context_processors.i18n',
                'django.template.context_processors.media',
                'django.template.context_processors.static',
                'django.template.context_processors.tz',
                'django.contrib.messages.context_processors.messages',
            ],
            'loaders':[
                'django.template.loaders.filesystem.Loader',
                'django.template.loaders.app_directories.Loader',
            ],
            'libraries':{
                'common_tags': 'core.templatetags.common_tags',

                },
        },
    },
]

MEDIA_ROOT = join(BASE_DIR, 'media')
STATIC_URL_BASE = '/static/'
MEDIA_URL_BASE = '/media/'

STATICFILES_DIRS = (
    # Put strings here, like "/home/html/static" or "C:/www/django/static".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
    join(BASE_DIR, 'static'),
#    join(dirname(core.__file__), 'static'),
)
# Make this unique, and don't share it with anybody.
SECRET_KEY = MY_SECRET_KEY

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


try:
    from core.settings.local import dbaccess_postgres
except ImportError:
    dbaccess_postgres = None
try:
    from core.settings.local import dbaccess_oracle_atlas
except ImportError:
    dbaccess_oracle_atlas = None
try:
    from core.settings.local import dbaccess_oracle_doma
except ImportError:
    dbaccess_oracle_atlas = None


#DEPLOYMENT = os.getenv('DEPLOYMENT_BACKEND', 'ORACLE_ATLAS')
DEPLOYMENT = 'ORACLE_DOMA'

PRMON_LOGS_DIRECTIO_LOCATION = None
if DEPLOYMENT == 'ORACLE_ATLAS':
    DB_SCHEMA = 'ATLAS_PANDABIGMON'
    DB_SCHEMA_PANDA = 'ATLAS_PANDA'<commit_msg>DOMA | add clone of workflows page that takes data from iDDS@GCP<commit_after>import os
from os.path import dirname, join

import core
from core import filebrowser, pbm, admin
from core.settings.local import MY_SECRET_KEY, LOG_ROOT

ALLOWED_HOSTS = [
    ### cern.ch
    '.cern.ch',  # Allow domain and subdomains
    '.cern.ch.',  # Also allow FQDN and subdomains
    ### bigpanda.cern.ch
    'bigpanda.cern.ch',  # Allow domain and subdomains
    'bigpanda.cern.ch.',  # Also allow FQDN and subdomains
    ### pandawms.org
    '.pandawms.org',  # Allow domain and subdomains
    '.pandawms.org.',  # Also allow FQDN and subdomains

    '127.0.0.1', '.localhost'
]

### VIRTUALENV
VIRTUALENV_PATH = '/data/virtualenv37'

### WSGI
#WSGI_PATH = VIRTUALENV_PATH + '/pythonpath'

### DB_ROUTERS for atlas's prodtask
DATABASE_ROUTERS = [
    'core.dbrouter.ProdMonDBRouter',
    'core.pbm.dbrouter.PandaBrokerageMonDBRouter',
]

# name spaces of DB tables per application
DATABASE_NAME_SPACES = {
    'bigpandamon': 'ATLAS_PANDABIGMON',
    'pandajob': 'ATLAS_PANDA',
    'pandaarchjob': 'ATLAS_PANDAARCH',
    'schedresource': 'ATLAS_PANDAMETA',
    'harvester': 'ATLAS_PANDA',
    'jedi': 'ATLAS_PANDA',
    'prodsys': 'ATLAS_DEFT',
}

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

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [
            join(dirname(core.__file__), 'templates'),
            join(dirname(admin.__file__), 'templates'),
            join(dirname(core.__file__), 'templates'),
            join(dirname(core.filebrowser.__file__), 'templates'),
            join(dirname(core.pbm.__file__), 'templates'),
        ],
        'OPTIONS': {
            'context_processors': [
                # Insert your TEMPLATE_CONTEXT_PROCESSORS here or use this
                # list if you haven't customized them:
                'django.contrib.auth.context_processors.auth',
                'django.template.context_processors.debug',
                'django.template.context_processors.i18n',
                'django.template.context_processors.media',
                'django.template.context_processors.static',
                'django.template.context_processors.tz',
                'django.contrib.messages.context_processors.messages',
            ],
            'loaders':[
                'django.template.loaders.filesystem.Loader',
                'django.template.loaders.app_directories.Loader',
            ],
            'libraries':{
                'common_tags': 'core.templatetags.common_tags',

                },
        },
    },
]

MEDIA_ROOT = join(BASE_DIR, 'media')
STATIC_URL_BASE = '/static/'
MEDIA_URL_BASE = '/media/'

STATICFILES_DIRS = (
    # Put strings here, like "/home/html/static" or "C:/www/django/static".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
    join(BASE_DIR, 'static'),
#    join(dirname(core.__file__), 'static'),
)
# Make this unique, and don't share it with anybody.
SECRET_KEY = MY_SECRET_KEY

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


try:
    from core.settings.local import dbaccess_postgres
except ImportError:
    dbaccess_postgres = None
try:
    from core.settings.local import dbaccess_oracle_atlas
except ImportError:
    dbaccess_oracle_atlas = None
try:
    from core.settings.local import dbaccess_oracle_doma
except ImportError:
    dbaccess_oracle_atlas = None


#DEPLOYMENT = os.getenv('DEPLOYMENT_BACKEND', 'ORACLE_ATLAS')
DEPLOYMENT = 'ORACLE_ATLAS'

PRMON_LOGS_DIRECTIO_LOCATION = None
if DEPLOYMENT == 'ORACLE_ATLAS':
    DB_SCHEMA = 'ATLAS_PANDABIGMON'
    DB_SCHEMA_PANDA = 'ATLAS_PANDA'
{'fraction_non_alphanumeric': 0.1197749196141479, 'fraction_numerical': 0.003215434083601286, 'mean_word_length': 2.970744680851064, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1743478', 'n_tokens_mistral': 2607, 'n_tokens_neox': 2484, 'n_words': 465}