1 # Django settings for patchwork project.
7 ROOT_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir)
11 # https://docs.djangoproject.com/en/1.6/ref/settings/#core-settings
17 'django.contrib.auth',
18 'django.contrib.contenttypes',
19 'django.contrib.sessions',
20 'django.contrib.sites',
21 'django.contrib.admin',
27 MIDDLEWARE_CLASSES = [
28 'django.middleware.common.CommonMiddleware',
29 'django.contrib.sessions.middleware.SessionMiddleware',
30 'django.contrib.auth.middleware.AuthenticationMiddleware',
31 'django.contrib.messages.middleware.MessageMiddleware',
32 'django.middleware.csrf.CsrfViewMiddleware',
35 if django.VERSION < (1, 7):
36 MIDDLEWARE_CLASSES.append('django.middleware.doc.XViewMiddleware')
38 MIDDLEWARE_CLASSES.append(
39 'django.contrib.admindocs.middleware.XViewMiddleware')
40 TEST_RUNNER = 'django.test.runner.DiscoverRunner'
46 if django.VERSION >= (1, 7):
47 TEST_RUNNER = 'django.test.runner.DiscoverRunner'
52 ('Jeremy Kerr', 'jk@ozlabs.org'),
61 'ENGINE': 'django.db.backends.postgresql_psycopg2',
68 MEDIA_ROOT = os.path.join(
69 ROOT_DIR, 'lib', 'python', 'django', 'contrib', 'admin', 'media')
73 TIME_ZONE = 'Australia/Canberra'
75 LANGUAGE_CODE = 'en-au'
85 # Make this unique, and don't share it with anybody.
86 SECRET_KEY = '00000000000000000000000000000000000000000000000000'
93 os.path.join(ROOT_DIR, 'templates'),
99 # https://docs.djangoproject.com/en/1.6/ref/settings/#auth
102 ADMIN_MEDIA_PREFIX = '/media/'
104 LOGIN_URL = '/user/login/'
105 LOGIN_REDIRECT_URL = '/user/'
110 # https://docs.djangoproject.com/en/1.6/ref/settings/#sites
120 DEFAULT_PATCHES_PER_PAGE = 100
121 DEFAULT_FROM_EMAIL = 'Patchwork <patchwork@patchwork.example.com>'
123 CONFIRMATION_VALIDITY_DAYS = 7
125 NOTIFICATION_DELAY_MINUTES = 10
126 NOTIFICATION_FROM_EMAIL = DEFAULT_FROM_EMAIL
128 # Set to True to enable the Patchwork XML-RPC interface
129 ENABLE_XMLRPC = False
131 # set to True to enable redirections or URLs from previous versions
135 # Set to True to always generate https:// links instead of guessing
136 # the scheme based on current access. This is useful if SSL protocol
137 # is terminated upstream of the server (e.g. at the load balancer)
138 FORCE_HTTPS_LINKS = False
141 from local_settings import *
142 except ImportError, ex:
145 ("settings.py: error importing local settings file:\n" + \
147 "Do you have a local_settings.py module?\n") % str(ex))