~cjohnston/uci-engine/1318774

« back to all changes in this revision

Viewing changes to ticket_system/ticket_system/settings.py

  • Committer: Chris Johnston
  • Date: 2013-12-09 17:29:57 UTC
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: chrisjohnston@ubuntu.com-20131209172957-y8vjn34zq17ugm8h
Add initial setup for the ticket system

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Ubuntu Continuous Integration Engine
 
2
# Copyright 2013 Canonical Ltd.
 
3
 
 
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.
 
7
 
 
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.
 
12
 
 
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.
 
16
 
 
17
DEBUG = False
 
18
TEMPLATE_DEBUG = DEBUG
 
19
 
 
20
ADMINS = (
 
21
    # ('Your Name', 'your_email@example.com'),
 
22
)
 
23
 
 
24
MANAGERS = ADMINS
 
25
 
 
26
DATABASES = {
 
27
    'default': {
 
28
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
 
29
        'NAME': '',
 
30
        'USER': '',
 
31
        'PASSWORD': '',
 
32
        'HOST': '',
 
33
        'PORT': '',
 
34
    }
 
35
}
 
36
 
 
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
 
39
ALLOWED_HOSTS = []
 
40
 
 
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.
 
45
TIME_ZONE = 'GMT'
 
46
 
 
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'
 
50
 
 
51
SITE_ID = 1
 
52
 
 
53
# If you set this to False, Django will make some optimizations so as not
 
54
# to load the internationalization machinery.
 
55
USE_I18N = False
 
56
 
 
57
# If you set this to False, Django will not format dates, numbers and
 
58
# calendars according to the current locale.
 
59
USE_L10N = True
 
60
 
 
61
# If you set this to False, Django will not use timezone-aware datetimes.
 
62
USE_TZ = True
 
63
 
 
64
# Absolute filesystem path to the directory that will hold user-uploaded files.
 
65
# Example: "/var/www/example.com/media/"
 
66
MEDIA_ROOT = ''
 
67
 
 
68
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
 
69
# trailing slash.
 
70
# Examples: "http://example.com/media/", "http://media.example.com/"
 
71
MEDIA_URL = ''
 
72
 
 
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/"
 
77
STATIC_ROOT = ''
 
78
 
 
79
# URL prefix for static files.
 
80
# Example: "http://example.com/static/", "http://static.example.com/"
 
81
STATIC_URL = '/static/'
 
82
 
 
83
# Additional locations of static files
 
84
STATICFILES_DIRS = (
 
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.
 
88
)
 
89
 
 
90
# List of finder classes that know how to find static files in
 
91
# various locations.
 
92
STATICFILES_FINDERS = (
 
93
    'django.contrib.staticfiles.finders.FileSystemFinder',
 
94
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
 
95
    #'django.contrib.staticfiles.finders.DefaultStorageFinder',
 
96
)
 
97
 
 
98
# Make this unique, and don't share it with anybody.
 
99
SECRET_KEY = '1)*_ck0b)6mek=&dud8(g(=13g$s)_bwu#vzsq0g6yfjgdx-zb'
 
100
 
 
101
# List of callables that know how to import templates from various sources.
 
102
TEMPLATE_LOADERS = (
 
103
    'django.template.loaders.filesystem.Loader',
 
104
    'django.template.loaders.app_directories.Loader',
 
105
)
 
106
 
 
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',
 
115
)
 
116
 
 
117
ROOT_URLCONF = 'ticket_system.urls'
 
118
 
 
119
# Python dotted path to the WSGI application used by Django's runserver.
 
120
WSGI_APPLICATION = 'ticket_system.wsgi.application'
 
121
 
 
122
TEMPLATE_DIRS = (
 
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.
 
127
)
 
128
 
 
129
INSTALLED_APPS = (
 
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',
 
137
    'south',
 
138
    'tastypie',
 
139
)
 
140
 
 
141
LOCAL_APPS = (
 
142
    'people',
 
143
    'project',
 
144
    'ticket',
 
145
)
 
146
 
 
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']
 
151
 
 
152
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
 
153
 
 
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.
 
159
LOGGING = {
 
160
    'version': 1,
 
161
    'disable_existing_loggers': False,
 
162
    'filters': {
 
163
        'require_debug_false': {
 
164
            '()': 'django.utils.log.RequireDebugFalse'
 
165
        }
 
166
    },
 
167
    'handlers': {
 
168
        'mail_admins': {
 
169
            'level': 'ERROR',
 
170
            'filters': ['require_debug_false'],
 
171
            'class': 'django.utils.log.AdminEmailHandler'
 
172
        }
 
173
    },
 
174
    'loggers': {
 
175
        'django.request': {
 
176
            'handlers': ['mail_admins'],
 
177
            'level': 'ERROR',
 
178
            'propagate': True,
 
179
        },
 
180
    }
 
181
}
 
182
 
 
183
# Use local settings if available
 
184
try:
 
185
    from local_settings import *
 
186
except ImportError:
 
187
    pass
 
188
 
 
189
try:
 
190
    from db_settings import DATABASES
 
191
except ImportError:
 
192
    pass