aboutsummaryrefslogtreecommitdiff
path: root/settings.py
blob: 8692fdbb547cbb0ef437dfd9969dc39073a61ec3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
###############################################################################
# Copyright (c) 2011 Linaro
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
###############################################################################

# Django settings for android_build project.

from django.conf import global_settings
import os
import logging

#TODO: switch to integrated logging configuration when upgrading
#to django 1.3
logging.basicConfig(level=logging.INFO)

DEBUG = False 
TEMPLATE_DEBUG = DEBUG

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

TEMPLATE_DIRS = (
    os.path.join(PROJECT_DIR, "templates"),
)

ADMINS = (
    # ('Your Name', 'your_email@domain.com'),
)

MANAGERS = ADMINS

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

TIME_ZONE = 'UTC'
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
USE_I18N = False
USE_L10N = True

# Make this unique, and don't share it with anybody.
SECRET_KEY = 'ick(5so3(c7p^s^37u(a(4fvx7d_w5vv3x$1bedb99xm)#*lr$'

TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
)

ROOT_URLCONF = 'android_build.urls'

INSTALLED_APPS = (
    'django.contrib.auth',
    'django_openid_auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.admin',
    'longerusername',
    'crowdrest',
    'android_build',
)

TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + (
    'android_build.context_processors.handy_urls',
)


MEDIA_URL = '/static/'

OPENID_CREATE_USERS = True
OPENID_UPDATE_DETAILS_FROM_SREG = True
OPENID_SSO_SERVER_URL = 'https://login.ubuntu.com/'
OPENID_LAUNCHPAD_TEAMS_MAPPING_AUTO = True

AUTH_CROWD_APPLICATION_USER = None
AUTH_CROWD_APPLICATION_PASSWORD = None
AUTH_CROWD_SERVER_REST_URI = 'https://login.linaro.org:8443/crowd/rest/usermanagement/1'

AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
#    'django_openid_auth.auth.OpenIDBackend',
    'crowdrest.backend.CrowdRestBackend',
)

PREFIX = ''

LOGIN_REDIRECT_URL = '/'
# SSO login URL
#LOGIN_URL = '/openid/login/'
# Explicit login URL
LOGIN_URL = '/login/'
LOGOUT_URL = '/logout'

JENKINS_URL_FOR_APP = '/jenkins'
SERVER_JENKINS_URL = 'http://127.0.0.1:8080/jenkins/'
FRONTEND_JENKINS_USER = 'admin'
FRONTEND_JENKINS_PASSWORD = 'password'
# Name of preconfigured job used as a template for all other jobs
TEMPLATE_JOB_NAME = 'template_%s'
# We generally use group name as a prefix, but allow for adhoc mapping
GROUP_TO_PREFIX_MAP = {
    "linaro-android-builders": "$user",
    "linaro-android-official-builders": "linaro-android",
}

USE_OWN_COMBO=False

SNAPSHOTS_URL = "https://snapshots.linaro.org/"