1
# Ubuntu Continuous Integration Engine
2
# Copyright 2013 Canonical Ltd.
4
# This program is free software: you can redistribute it and/or modify it
5
# under the terms of the GNU Affero General Public License version 3, as
6
# published by the Free Software Foundation.
8
# This program is distributed in the hope that it will be useful, but
9
# WITHOUT ANY WARRANTY; without even the implied warranties of
10
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
11
# PURPOSE. See the GNU Affero General Public License for more details.
13
# You should have received a copy of the GNU Affero General Public License
14
# along with this program. If not, see <http://www.gnu.org/licenses/>.
15
# Django settings for ticket_system project.
18
TEMPLATE_DEBUG = DEBUG
21
# ('Your Name', 'your_email@example.com'),
28
'ENGINE': 'django.db.backends.postgresql_psycopg2',
37
# Hosts/domain names that are valid for this site; required if DEBUG is False
38
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
41
# Local time zone for this installation. Choices can be found here:
42
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
43
# although not all choices may be available on all operating systems.
44
# In a Windows environment this must be set to your system time zone.
47
# Language code for this installation. All choices can be found here:
48
# http://www.i18nguy.com/unicode/language-identifiers.html
49
LANGUAGE_CODE = 'en-us'
53
# If you set this to False, Django will make some optimizations so as not
54
# to load the internationalization machinery.
57
# If you set this to False, Django will not format dates, numbers and
58
# calendars according to the current locale.
61
# If you set this to False, Django will not use timezone-aware datetimes.
64
# Absolute filesystem path to the directory that will hold user-uploaded files.
65
# Example: "/var/www/example.com/media/"
68
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
70
# Examples: "http://example.com/media/", "http://media.example.com/"
73
# Absolute path to the directory static files should be collected to.
74
# Don't put anything in this directory yourself; store your static files
75
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
76
# Example: "/var/www/example.com/static/"
79
# URL prefix for static files.
80
# Example: "http://example.com/static/", "http://static.example.com/"
81
STATIC_URL = '/static/'
83
# Additional locations of static files
85
# Put strings here, like "/home/html/static" or "C:/www/django/static".
86
# Always use forward slashes, even on Windows.
87
# Don't forget to use absolute paths, not relative paths.
90
# List of finder classes that know how to find static files in
92
STATICFILES_FINDERS = (
93
'django.contrib.staticfiles.finders.FileSystemFinder',
94
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
95
#'django.contrib.staticfiles.finders.DefaultStorageFinder',
98
# Make this unique, and don't share it with anybody.
99
SECRET_KEY = '1)*_ck0b)6mek=&dud8(g(=13g$s)_bwu#vzsq0g6yfjgdx-zb'
101
# List of callables that know how to import templates from various sources.
103
'django.template.loaders.filesystem.Loader',
104
'django.template.loaders.app_directories.Loader',
107
MIDDLEWARE_CLASSES = (
108
'django.middleware.common.CommonMiddleware',
109
'django.contrib.sessions.middleware.SessionMiddleware',
110
'django.middleware.csrf.CsrfViewMiddleware',
111
'django.contrib.auth.middleware.AuthenticationMiddleware',
112
'django.contrib.messages.middleware.MessageMiddleware',
113
# Uncomment the next line for simple clickjacking protection:
114
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
117
ROOT_URLCONF = 'ticket_system.urls'
119
# Python dotted path to the WSGI application used by Django's runserver.
120
WSGI_APPLICATION = 'ticket_system.wsgi.application'
123
# Put strings here, like "/home/html/django_templates" or
124
# "C:/www/django/templates".
125
# Always use forward slashes, even on Windows.
126
# Don't forget to use absolute paths, not relative paths.
130
'django.contrib.auth',
131
'django.contrib.contenttypes',
132
'django.contrib.sessions',
133
'django.contrib.sites',
134
'django.contrib.messages',
135
'django.contrib.staticfiles',
136
'django.contrib.admin',
147
INSTALLED_APPS = LOCAL_APPS + INSTALLED_APPS
148
TEST_RUNNER = "ticket_system.local_tests.LocalAppsTestSuiteRunner"
149
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
150
TASTYPIE_DEFAULT_FORMATS = ['json']
152
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
154
# A sample logging configuration. The only tangible logging
155
# performed by this configuration is to send an email to
156
# the site admins on every HTTP 500 error when DEBUG=False.
157
# See http://docs.djangoproject.com/en/dev/topics/logging for
158
# more details on how to customize your logging configuration.
161
'disable_existing_loggers': False,
163
'require_debug_false': {
164
'()': 'django.utils.log.RequireDebugFalse'
170
'filters': ['require_debug_false'],
171
'class': 'django.utils.log.AdminEmailHandler'
176
'handlers': ['mail_admins'],
183
# Use local settings if available
185
from local_settings import *
190
from db_settings import DATABASES