2 Base settings for patchwork project.
9 ROOT_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)),
14 # https://docs.djangoproject.com/en/1.6/ref/settings/#core-settings
20 'django.contrib.auth',
21 'django.contrib.contenttypes',
22 'django.contrib.sessions',
23 'django.contrib.sites',
24 'django.contrib.admin',
25 'django.contrib.staticfiles',
31 MIDDLEWARE_CLASSES = [
32 'django.middleware.common.CommonMiddleware',
33 'django.contrib.sessions.middleware.SessionMiddleware',
34 'django.contrib.auth.middleware.AuthenticationMiddleware',
35 'django.contrib.messages.middleware.MessageMiddleware',
36 'django.middleware.csrf.CsrfViewMiddleware',
39 if django.VERSION < (1, 7):
40 MIDDLEWARE_CLASSES.append('django.middleware.doc.XViewMiddleware')
42 MIDDLEWARE_CLASSES.append(
43 'django.contrib.admindocs.middleware.XViewMiddleware')
47 TIME_ZONE = 'Australia/Canberra'
49 LANGUAGE_CODE = 'en-au'
55 TEST_RUNNER = 'django.test.runner.DiscoverRunner'
59 ROOT_URLCONF = 'patchwork.urls'
64 os.path.join(ROOT_DIR, 'templates'),
70 # https://docs.djangoproject.com/en/1.6/ref/settings/#auth
73 LOGIN_URL = '/user/login/'
74 LOGIN_REDIRECT_URL = '/user/'
79 # https://docs.djangoproject.com/en/1.6/ref/settings/#sites
86 # Static files settings
87 # https://docs.djangoproject.com/en/1.6/ref/settings/#static-files
90 STATIC_URL = '/static/'
93 os.path.join(ROOT_DIR, 'htdocs'),
101 DEFAULT_PATCHES_PER_PAGE = 100
102 DEFAULT_FROM_EMAIL = 'Patchwork <patchwork@patchwork.example.com>'
104 CONFIRMATION_VALIDITY_DAYS = 7
106 NOTIFICATION_DELAY_MINUTES = 10
107 NOTIFICATION_FROM_EMAIL = DEFAULT_FROM_EMAIL
109 # Set to True to enable the Patchwork XML-RPC interface
110 ENABLE_XMLRPC = False
112 # Set to True to enable redirections or URLs from previous versions
116 # Set to True to always generate https:// links instead of guessing
117 # the scheme based on current access. This is useful if SSL protocol
118 # is terminated upstream of the server (e.g. at the load balancer)
119 FORCE_HTTPS_LINKS = False