#
# Core settings
-# https://docs.djangoproject.com/en/1.6/ref/settings/#core-settings
+# https://docs.djangoproject.com/en/1.8/ref/settings/#core-settings
#
-# Models
-
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'patchwork',
]
-try:
- # django rest framework isn't a standard package in most distros, so
- # don't make it compulsory
- import rest_framework # NOQA
- INSTALLED_APPS += ['rest_framework']
-except ImportError:
- pass
-
-# HTTP
-
MIDDLEWARE_CLASSES = [
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
else:
MIDDLEWARE_CLASSES.append('django.middleware.doc.XViewMiddleware')
-# Globalization
-
TIME_ZONE = 'Australia/Canberra'
LANGUAGE_CODE = 'en-au'
USE_I18N = True
-# Testing
-
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
-# URLs
-
ROOT_URLCONF = 'patchwork.urls'
-# Templates
-
_TEMPLATE_DIRS = [
os.path.join(ROOT_DIR, 'templates'),
]
]
-# Email
-
DEFAULT_FROM_EMAIL = 'Patchwork <patchwork@patchwork.example.com>'
+
SERVER_EMAIL = DEFAULT_FROM_EMAIL
#
# Auth settings
-# https://docs.djangoproject.com/en/1.6/ref/settings/#auth
+# https://docs.djangoproject.com/en/1.8/ref/settings/#auth
#
LOGIN_URL = 'auth_login'
+
LOGIN_REDIRECT_URL = 'user-profile'
#
# Sites settings
-# https://docs.djangoproject.com/en/1.6/ref/settings/#sites
+# https://docs.djangoproject.com/en/1.8/ref/settings/#sites
#
SITE_ID = 1
#
# Static files settings
-# https://docs.djangoproject.com/en/1.6/ref/settings/#static-files
+# https://docs.djangoproject.com/en/1.8/ref/settings/#static-files
#
STATIC_URL = '/static/'
os.path.join(ROOT_DIR, 'htdocs'),
]
+#
+# Third-party application settings
+#
+
+try:
+ # django rest framework isn't a standard package in most distros, so
+ # don't make it compulsory
+ import rest_framework # NOQA
+
+ INSTALLED_APPS += [
+ 'rest_framework'
+ ]
+except ImportError:
+ pass
+
+#
+# Third-party application settings
+#
+
+# rest_framework
+
+REST_FRAMEWORK = {
+ 'DEFAULT_VERSIONING_CLASS': 'rest_framework.versioning.NamespaceVersioning'
+}
#
# Patchwork settings
CONFIRMATION_VALIDITY_DAYS = 7
NOTIFICATION_DELAY_MINUTES = 10
+
NOTIFICATION_FROM_EMAIL = DEFAULT_FROM_EMAIL
# Set to True to enable the Patchwork XML-RPC interface
# Set to True to enable the Patchwork REST API
ENABLE_REST_API = False
+
REST_RESULTS_PER_PAGE = 30
-REST_FRAMEWORK = {
- 'DEFAULT_VERSIONING_CLASS': 'rest_framework.versioning.NamespaceVersioning'
-}
# Set to True to enable redirections or URLs from previous versions
# of patchwork
#
# Core settings
-# https://docs.djangoproject.com/en/1.6/ref/settings/#core-settings
+# https://docs.djangoproject.com/en/1.8/ref/settings/#core-settings
#
-# Security
-
SECRET_KEY = '00000000000000000000000000000000000000000000000000'
-# Debugging
-
DEBUG = True
-# Templates
-
if django.VERSION < (1, 8):
# In Django 1.8+, this is only necessary if the value differs from
# the value for 'DEBUG'
TEMPLATE_DEBUG = True
-# Database
-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
else:
DATABASES['default']['TEST_CHARSET'] = 'utf8'
-# Email
-
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
#
#
# Core settings
-# https://docs.djangoproject.com/en/1.6/ref/settings/#core-settings
+# https://docs.djangoproject.com/en/1.8/ref/settings/#core-settings
#
# Security
#
# If you're using a postgres database, connecting over a local unix-domain
# socket, then the following setting should work for you. Otherwise,
-# see https://docs.djangoproject.com/en/1.7/ref/settings/#databases
+# see https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DATABASES = {
'default': {
#
# Static files settings
-# https://docs.djangoproject.com/en/1.7/ref/settings/#static-files
+# https://docs.djangoproject.com/en/1.8/ref/settings/#static-files
# https://docs.djangoproject.com/en/1.8/ref/contrib/staticfiles/#manifeststaticfilesstorage
#