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',
22 'django.contrib.staticfiles',
28 MIDDLEWARE_CLASSES = [
29 'django.middleware.common.CommonMiddleware',
30 'django.contrib.sessions.middleware.SessionMiddleware',
31 'django.contrib.auth.middleware.AuthenticationMiddleware',
32 'django.contrib.messages.middleware.MessageMiddleware',
33 'django.middleware.csrf.CsrfViewMiddleware',
36 if django.VERSION < (1, 7):
37 MIDDLEWARE_CLASSES.append('django.middleware.doc.XViewMiddleware')
39 MIDDLEWARE_CLASSES.append(
40 'django.contrib.admindocs.middleware.XViewMiddleware')
41 TEST_RUNNER = 'django.test.runner.DiscoverRunner'
47 if django.VERSION >= (1, 7):
48 TEST_RUNNER = 'django.test.runner.DiscoverRunner'
53 ('Jeremy Kerr', 'jk@ozlabs.org'),
62 'ENGINE': 'django.db.backends.postgresql_psycopg2',
69 MEDIA_ROOT = os.path.join(
70 ROOT_DIR, 'lib', 'python', 'django', 'contrib', 'admin', 'media')
74 TIME_ZONE = 'Australia/Canberra'
76 LANGUAGE_CODE = 'en-au'
82 ROOT_URLCONF = 'patchwork.urls'
86 # Make this unique, and don't share it with anybody.
87 SECRET_KEY = '00000000000000000000000000000000000000000000000000'
94 os.path.join(ROOT_DIR, 'templates'),
100 # https://docs.djangoproject.com/en/1.6/ref/settings/#auth
103 LOGIN_URL = '/user/login/'
104 LOGIN_REDIRECT_URL = '/user/'
109 # https://docs.djangoproject.com/en/1.6/ref/settings/#sites
116 # Static files settings
117 # https://docs.djangoproject.com/en/1.6/ref/settings/#static-files
120 STATIC_URL = '/static/'
123 os.path.join(ROOT_DIR, 'htdocs'),
131 DEFAULT_PATCHES_PER_PAGE = 100
132 DEFAULT_FROM_EMAIL = 'Patchwork <patchwork@patchwork.example.com>'
134 CONFIRMATION_VALIDITY_DAYS = 7
136 NOTIFICATION_DELAY_MINUTES = 10
137 NOTIFICATION_FROM_EMAIL = DEFAULT_FROM_EMAIL
139 # Set to True to enable the Patchwork XML-RPC interface
140 ENABLE_XMLRPC = False
142 # set to True to enable redirections or URLs from previous versions
146 # Set to True to always generate https:// links instead of guessing
147 # the scheme based on current access. This is useful if SSL protocol
148 # is terminated upstream of the server (e.g. at the load balancer)
149 FORCE_HTTPS_LINKS = False
152 from local_settings import *
153 except ImportError, ex:
156 ("settings.py: error importing local settings file:\n" + \
158 "Do you have a local_settings.py module?\n") % str(ex))