Example #1
0
# files collected from all applications.
# Example: "/home/media/static.lawrence.com/"
STATIC_ROOT = os.path.join(PROJECT_STATE_DIR, "static")

# Make this unique, and don't share it with anybody.
SECRET_KEY = '00000000000000000000000000000000000000000000000000'

# Use templates from the checkout directory
TEMPLATE_DIRS = (os.path.join(PROJECT_SRC_DIR, "templates"), )

# Serve static files used by lava-server from the checkout directory
STATICFILES_DIRS = [('lava-server', os.path.join(PROJECT_SRC_DIR, 'htdocs'))]

# Try using devserver if available, devserver is a very useful extension that
# makes debugging applications easier. It shows a lot of interesting output,
# like SQL queries and timings for each request. It also supports
# multi-threaded or multi-process server so some degree of parallelism can be
# achieved.
try:
    import devserver
    INSTALLED_APPS += ['devserver']
except ImportError:
    pass

# Any emails that would normally be sent are redirected to stdout.
# This setting is only used for django 1.2 and newer.
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

# Load extensions
loader.contribute_to_settings(locals())
Example #2
0
# like SQL queries and timings for each request. It also supports
# multi-threaded or multi-process server so some degree of parallelism can be
# achieved.
try:
    import devserver
    INSTALLED_APPS += ['devserver']
except ImportError:
    pass


# Any emails that would normally be sent are redirected to stdout.
# This setting is only used for django 1.2 and newer.
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

# Load extensions
loader.contribute_to_settings(locals())

# default branding details
BRANDING_ALT = "Linaro logo"
BRANDING_ICON = 'lava-server/images/linaro-sprinkles.png'
BRANDING_URL = 'http://www.linaro.org'
BRANDING_HEIGHT = "BRANDING_HEIGHT", 22
BRANDING_WIDTH = "BRANDING_WIDTH", 22

# Logging

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'filters': {
        'require_debug_false': {
Example #3
0
    OPENID_LAUNCHPAD_TEAMS_MAPPING = distro_settings.get_setting("OPENID_LAUNCHPAD_TEAMS_MAPPING")

# Atlassian Crowd authentication config
AUTH_CROWD_SERVER_REST_URI = distro_settings.get_setting("AUTH_CROWD_SERVER_REST_URI")
if AUTH_CROWD_SERVER_REST_URI:
    # If Crowd server URL is configured, disable OpenID and
    # enable Crowd auth backend
    INSTALLED_APPS.append('crowdrest')
    AUTHENTICATION_BACKENDS = ['crowdrest.backend.CrowdRestBackend'] + \
        [x for x in AUTHENTICATION_BACKENDS if "OpenID" not in x]

    # Load credentials from a separate file
    from lava_server.settings.config_file import ConfigFile
    pathname = distro_settings._get_pathname("crowd")
    crowd_config = ConfigFile.load(pathname)
    AUTH_CROWD_APPLICATION_USER = crowd_config.AUTH_CROWD_APPLICATION_USER
    AUTH_CROWD_APPLICATION_PASSWORD = crowd_config.AUTH_CROWD_APPLICATION_PASSWORD
    if distro_settings.get_setting("AUTH_CROWD_GROUP_MAP"):
        AUTH_CROWD_GROUP_MAP = distro_settings.get_setting("AUTH_CROWD_GROUP_MAP")

# Load extensions
loader.contribute_to_settings(locals(), distro_settings)

from django.db.backends.signals import connection_created


def set_timeout(connection, **kw):
    connection.cursor().execute("SET statement_timeout to 30000")

connection_created.connect(set_timeout)
Example #4
0
            'handlers': ['logfile'],
            'level': 'INFO',
            'propagate': True,
        },
        'dashboard_app': {
            'handlers': ['logfile'],
            'level': 'INFO',
            'propagate': True,
        },
        'lava_scheduler_app': {
            'handlers': ['logfile'],
            'level': 'INFO',
            'propagate': True,
        }
    }
}

# pipeline results display
# set to false in /etc/lava-server/settings.conf to hide the Results menu
PIPELINE = distro_settings.get_setting("PIPELINE", True)

# Load extensions
loader.contribute_to_settings(locals(), distro_settings)


def set_timeout(connection, **kw):
    connection.cursor().execute("SET statement_timeout to 30000")


connection_created.connect(set_timeout)