1 # Django settings for patchwork project.
9 ('Jeremy Kerr', 'jk@ozlabs.org'),
16 'ENGINE': 'django.db.backends.postgresql_psycopg2',
21 # Local time zone for this installation. Choices can be found here:
22 # http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
23 # although not all variations may be possible on all operating systems.
24 # If running in a Windows environment this must be set to the same as your
26 TIME_ZONE = 'Australia/Canberra'
28 # Language code for this installation. All choices can be found here:
29 # http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
30 # http://blogs.law.harvard.edu/tech/stories/storyReader$15
31 LANGUAGE_CODE = 'en-au'
35 # If you set this to False, Django will make some optimizations so as not
36 # to load the internationalization machinery.
39 # URL that handles the media served from MEDIA_ROOT.
40 # Example: "http://media.lawrence.com"
43 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
45 # Examples: "http://foo.com/media/", "/media/".
46 ADMIN_MEDIA_PREFIX = '/media/'
48 # Make this unique, and don't share it with anybody.
49 SECRET_KEY = '00000000000000000000000000000000000000000000000000'
51 # List of callables that know how to import templates from various sources.
53 'django.template.loaders.filesystem.Loader',
54 'django.template.loaders.app_directories.Loader',
57 MIDDLEWARE_CLASSES = [
58 'django.middleware.common.CommonMiddleware',
59 'django.contrib.sessions.middleware.SessionMiddleware',
60 'django.contrib.auth.middleware.AuthenticationMiddleware',
61 'django.contrib.messages.middleware.MessageMiddleware',
62 'django.middleware.doc.XViewMiddleware',
63 'django.middleware.csrf.CsrfViewMiddleware',
66 if django.VERSION < (1, 7):
67 MIDDLEWARE_CLASSES.append('django.middleware.doc.XViewMiddleware')
69 MIDDLEWARE_CLASSES.append(
70 'django.contrib.admindocs.middleware.XViewMiddleware')
71 TEST_RUNNER = 'django.test.runner.DiscoverRunner'
75 LOGIN_URL = '/user/login/'
76 LOGIN_REDIRECT_URL = '/user/'
78 ROOT_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir)
80 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
81 # Always use forward slashes, even on Windows.
82 # Don't forget to use absolute paths, not relative paths.
83 os.path.join(ROOT_DIR, 'templates'),
85 # Absolute path to the directory that holds media.
86 # Example: "/home/media/media.lawrence.com/"
87 MEDIA_ROOT = os.path.join(
88 ROOT_DIR, 'lib', 'python', 'django', 'contrib', 'admin', 'media')
90 TEMPLATE_CONTEXT_PROCESSORS = (
91 "django.contrib.auth.context_processors.auth",
92 "django.core.context_processors.debug",
93 "django.core.context_processors.i18n",
94 "django.core.context_processors.media")
97 'django.contrib.auth',
98 'django.contrib.contenttypes',
99 'django.contrib.sessions',
100 'django.contrib.sites',
101 'django.contrib.admin',
105 DEFAULT_PATCHES_PER_PAGE = 100
106 DEFAULT_FROM_EMAIL = 'Patchwork <patchwork@patchwork.example.com>'
108 CONFIRMATION_VALIDITY_DAYS = 7
110 NOTIFICATION_DELAY_MINUTES = 10
111 NOTIFICATION_FROM_EMAIL = DEFAULT_FROM_EMAIL
113 # Set to True to enable the Patchwork XML-RPC interface
114 ENABLE_XMLRPC = False
116 # set to True to enable redirections or URLs from previous versions
120 # Set to True to always generate https:// links instead of guessing
121 # the scheme based on current access. This is useful if SSL protocol
122 # is terminated upstream of the server (e.g. at the load balancer)
123 FORCE_HTTPS_LINKS = False
126 from local_settings import *
127 except ImportError, ex:
130 ("settings.py: error importing local settings file:\n" + \
132 "Do you have a local_settings.py module?\n") % str(ex))