]> git.ozlabs.org Git - patchwork/blob - apps/settings.py
Resolve removed 'AUTH_PROFILE_MODULE' setting
[patchwork] / apps / settings.py
1 # Django settings for patchwork project.
2 import os
3
4 DEBUG = True
5 TEMPLATE_DEBUG = DEBUG
6
7 ADMINS = (
8      ('Jeremy Kerr', 'jk@ozlabs.org'),
9 )
10
11 MANAGERS = ADMINS
12
13 DATABASES = {
14     'default': {
15         'ENGINE': 'django.db.backends.postgresql_psycopg2',
16         'NAME': 'patchwork',
17     },
18 }
19
20 # Local time zone for this installation. Choices can be found here:
21 # http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
22 # although not all variations may be possible on all operating systems.
23 # If running in a Windows environment this must be set to the same as your
24 # system time zone.
25 TIME_ZONE = 'Australia/Canberra'
26
27 # Language code for this installation. All choices can be found here:
28 # http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
29 # http://blogs.law.harvard.edu/tech/stories/storyReader$15
30 LANGUAGE_CODE = 'en-au'
31
32 SITE_ID = 1
33
34 # If you set this to False, Django will make some optimizations so as not
35 # to load the internationalization machinery.
36 USE_I18N = True
37
38 # URL that handles the media served from MEDIA_ROOT.
39 # Example: "http://media.lawrence.com"
40 MEDIA_URL = ''
41
42 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
43 # trailing slash.
44 # Examples: "http://foo.com/media/", "/media/".
45 ADMIN_MEDIA_PREFIX = '/media/'
46
47 # Make this unique, and don't share it with anybody.
48 SECRET_KEY = '00000000000000000000000000000000000000000000000000'
49
50 # List of callables that know how to import templates from various sources.
51 TEMPLATE_LOADERS = (
52     'django.template.loaders.filesystem.Loader',
53     'django.template.loaders.app_directories.Loader',
54 #     'django.template.loaders.eggs.load_template_source',
55 )
56
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',
64 )
65
66 ROOT_URLCONF = 'urls'
67
68 LOGIN_URL = '/user/login/'
69 LOGIN_REDIRECT_URL = '/user/'
70
71 ROOT_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir)
72 TEMPLATE_DIRS = (
73     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
74     # Always use forward slashes, even on Windows.
75     # Don't forget to use absolute paths, not relative paths.
76     os.path.join(ROOT_DIR, 'templates'),
77 )
78 # Absolute path to the directory that holds media.
79 # Example: "/home/media/media.lawrence.com/"
80 MEDIA_ROOT = os.path.join(
81     ROOT_DIR, 'lib', 'python', 'django', 'contrib', 'admin', 'media')
82
83 TEMPLATE_CONTEXT_PROCESSORS = (
84     "django.contrib.auth.context_processors.auth",
85     "django.core.context_processors.debug",
86     "django.core.context_processors.i18n",
87     "django.core.context_processors.media")
88
89 INSTALLED_APPS = (
90     'django.contrib.auth',
91     'django.contrib.contenttypes',
92     'django.contrib.sessions',
93     'django.contrib.sites',
94     'django.contrib.admin',
95     'patchwork',
96 )
97
98 DEFAULT_PATCHES_PER_PAGE = 100
99 DEFAULT_FROM_EMAIL = 'Patchwork <patchwork@patchwork.example.com>'
100
101 CONFIRMATION_VALIDITY_DAYS = 7
102
103 NOTIFICATION_DELAY_MINUTES = 10
104 NOTIFICATION_FROM_EMAIL = DEFAULT_FROM_EMAIL
105
106 # Set to True to enable the Patchwork XML-RPC interface
107 ENABLE_XMLRPC = False
108
109 # set to True to enable redirections or URLs from previous versions
110 # of patchwork
111 COMPAT_REDIR = True
112
113 # Set to True to always generate https:// links instead of guessing
114 # the scheme based on current access. This is useful if SSL protocol
115 # is terminated upstream of the server (e.g. at the load balancer)
116 FORCE_HTTPS_LINKS = False
117
118 try:
119     from local_settings import *
120 except ImportError, ex:
121     import sys
122     sys.stderr.write(\
123             ("settings.py: error importing local settings file:\n" + \
124             "\t%s\n" + \
125             "Do you have a local_settings.py module?\n") % str(ex))
126     raise