Exemplo n.º 1
0
import imp
import os

from django.utils.translation import ugettext_lazy as _

import daiquiri.core.env as env

CONFIG_DIR = imp.find_module('config')[1]
BASE_DIR = os.path.dirname(CONFIG_DIR)
DAIQUIRI_APP = os.path.basename(BASE_DIR).replace('-', '_')

BASE_URL = env.get_url('BASE_URL', '/')

DEBUG = env.get_bool('DEBUG')

SECRET_KEY = env.get('SECRET_KEY')

ALLOWED_HOSTS = env.get_list('ALLOWED_HOSTS',
                             ['localhost', '127.0.0.1', '::1'])

if env.get_bool('PROXY'):
    USE_X_FORWARDED_HOST = True
    SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

INTERNAL_IPS = env.get_list('INTERNAL_IPS', ['127.0.0.1'])

ADMINS = env.get_email_list('ADMINS')

SITE_ID = 1

ROOT_URLCONF = 'config.urls'
Exemplo n.º 2
0
import daiquiri.core.env as env

OAI_SCHEMA = env.get('OAI_SCHEMA', 'oai_schema')

OAI_ADAPTER = 'daiquiri.metadata.adapter.RegistryDoiMetadataOaiAdapter'
OAI_METADATA_FORMATS = [{
    'prefix':
    'oai_dc',
    'schema':
    'http://www.openarchives.org/OAI/2.0/oai_dc.xsd',
    'namespace':
    'http://www.openarchives.org/OAI/2.0/oai_dc/',
    'renderer_class':
    'daiquiri.oai.renderers.DublincoreRenderer'
}, {
    'prefix':
    'oai_datacite',
    'schema':
    'http://schema.datacite.org/oai/oai-1.1/oai.xsd',
    'namespace':
    'http://schema.datacite.org/oai/oai-1.1/',
    'renderer_class':
    'daiquiri.oai.renderers.OaiDataciteRenderer'
}, {
    'prefix':
    'datacite',
    'schema':
    'http://schema.datacite.org/meta/nonexistant/nonexistant.xsd',
    'namespace':
    'http://datacite.org/schema/nonexistant',
    'renderer_class':
Exemplo n.º 3
0
from kombu import Exchange, Queue

import daiquiri.core.env as env

CELERY_BROKER_URL = env.get('CELERY_BROKER_URL', 'amqp://')

CELERY_TASK_ACKS_LATE = True
CELERY_WORKER_PREFETCH_MULTIPLIER = 1

CELERY_TASK_DEFAULT_QUEUE = 'default'

CELERY_TASK_QUEUES = [
    Queue('default', Exchange('default'), routing_key='default'),
    Queue('download', Exchange('download'), routing_key='download'),
    Queue('query',
          Exchange('query'),
          routing_key='query',
          queue_arguments={'x-max-priority': 5})
]
Exemplo n.º 4
0
import daiquiri.core.env as env

ASYNC = env.get_bool('ASYNC')

IPV4_PRIVACY_MASK = 16
IPV6_PRIVACY_MASK = 32

SITE_URL = env.get('SITE_URL')

SITE_IDENTIFIER = None
SITE_TITLE = None
SITE_DESCRIPTION = None
SITE_LICENSE = None
SITE_CREATOR = None
SITE_CONTACT = None
SITE_PUBLISHER = None
SITE_CREATED = None
SITE_UPDATED = None
SITE_LANGUAGE = 'en'
SITE_SUBJECTS = [{
    'subject':
    'Astronomy',
    'schemeURI':
    'http://id.loc.gov/authorities/subjects',
    'valueURI':
    'http://id.loc.gov/authorities/subjects/sh85009003'
}]
SITE_TYPE = 'service'
SITE_LOGO_URL = None
Exemplo n.º 5
0
import daiquiri.core.env as env

TAP_SCHEMA = env.get('TAP_SCHEMA', 'tap_schema')
TAP_UPLOAD = env.get('TAP_UPLOAD', 'tap_upload')

TAP_SUBJECTS = ['tap']
Exemplo n.º 6
0
import daiquiri.core.env as env

WORDPRESS_PATH = env.get_abspath('WORDPRESS_PATH')
WORDPRESS_SSH = env.get('WORDPRESS_SSH')
WORDPRESS_CLI = env.get('WORDPRESS_CLI', '/opt/wp-cli/wp')

WORDPRESS_URL = '/cms/'
Exemplo n.º 7
0
import daiquiri.core.env as env

FILES_BASE_PATH = env.get_abspath('FILES_BASE_PATH')
FILES_BASE_URL = env.get('FILES_BASE_URL')
Exemplo n.º 8
0
import daiquiri.core.env as env

CONESEARCH_ADAPTER = 'daiquiri.conesearch.adapter.SimpleConeSearchAdapter'
CONESEARCH_ANONYMOUS = False

CONESEARCH_SCHEMA = env.get('CONESEARCH_SCHEMA')
CONESEARCH_TABLE = env.get('CONESEARCH_TABLE')

CONESEARCH_SUBJECTS = ['cone search']
Exemplo n.º 9
0
import os

import daiquiri.core.env as env

LOG_LEVEL = env.get('LOG_LEVEL')
LOG_DIR = env.get('LOG_DIR')

if LOG_DIR:
    LOGGING = {
        'version': 1,
        'disable_existing_loggers': True,
        'filters': {
            'require_debug_false': {
                '()': 'django.utils.log.RequireDebugFalse'
            },
            'require_debug_true': {
                '()': 'django.utils.log.RequireDebugTrue'
            }
        },
        'formatters': {
            'default': {
                'format': '[%(asctime)s] %(levelname)s: %(message)s'
            },
            'name': {
                'format': '[%(asctime)s] %(levelname)s %(name)s %(funcName)s: %(message)s'
            },
            'console': {
                'format': '[%(asctime)s] %(message)s'
            }
        },
        'handlers': {