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 ROOT_URLCONF = 'patchwork.urls'
60 os.path.join(ROOT_DIR, 'templates'),
66 # https://docs.djangoproject.com/en/1.6/ref/settings/#auth
69 LOGIN_URL = '/user/login/'
70 LOGIN_REDIRECT_URL = '/user/'
75 # https://docs.djangoproject.com/en/1.6/ref/settings/#sites
82 # Static files settings
83 # https://docs.djangoproject.com/en/1.6/ref/settings/#static-files
86 STATIC_URL = '/static/'
89 os.path.join(ROOT_DIR, 'htdocs'),
97 DEFAULT_PATCHES_PER_PAGE = 100
98 DEFAULT_FROM_EMAIL = 'Patchwork <patchwork@patchwork.example.com>'
100 CONFIRMATION_VALIDITY_DAYS = 7
102 NOTIFICATION_DELAY_MINUTES = 10
103 NOTIFICATION_FROM_EMAIL = DEFAULT_FROM_EMAIL
105 # Set to True to enable the Patchwork XML-RPC interface
106 ENABLE_XMLRPC = False
108 # Set to True to enable redirections or URLs from previous versions
112 # Set to True to always generate https:// links instead of guessing
113 # the scheme based on current access. This is useful if SSL protocol
114 # is terminated upstream of the server (e.g. at the load balancer)
115 FORCE_HTTPS_LINKS = False
117 TEST_RUNNER = 'django.test.runner.DiscoverRunner'