1 # Django settings for patchwork project.
8 ('Jeremy Kerr', 'jk@ozlabs.org'),
15 'ENGINE': 'django.db.backends.postgresql_psycopg2',
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
25 TIME_ZONE = 'Australia/Canberra'
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'
34 # If you set this to False, Django will make some optimizations so as not
35 # to load the internationalization machinery.
38 # URL that handles the media served from MEDIA_ROOT.
39 # Example: "http://media.lawrence.com"
42 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
44 # Examples: "http://foo.com/media/", "/media/".
45 ADMIN_MEDIA_PREFIX = '/media/'
47 # Make this unique, and don't share it with anybody.
48 SECRET_KEY = '00000000000000000000000000000000000000000000000000'
50 # List of callables that know how to import templates from various sources.
52 'django.template.loaders.filesystem.load_template_source',
53 'django.template.loaders.app_directories.load_template_source',
54 # 'django.template.loaders.eggs.load_template_source',
57 MIDDLEWARE_CLASSES = (
58 'django.middleware.common.CommonMiddleware',
59 'django.contrib.sessions.middleware.SessionMiddleware',
60 'django.contrib.auth.middleware.AuthenticationMiddleware',
61 'django.middleware.doc.XViewMiddleware',
62 'django.middleware.csrf.CsrfViewMiddleware',
65 ROOT_URLCONF = 'apps.urls'
67 LOGIN_URL = '/user/login/'
68 LOGIN_REDIRECT_URL = '/user/'
70 # If you change the ROOT_DIR setting in your local_settings.py, you'll need to
71 # re-define the variables that use this (MEDIA_ROOT and TEMPLATE_DIRS) too.
72 ROOT_DIR = '/srv/patchwork'
74 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
75 # Always use forward slashes, even on Windows.
76 # Don't forget to use absolute paths, not relative paths.
77 os.path.join(ROOT_DIR, 'templates')
79 # Absolute path to the directory that holds media.
80 # Example: "/home/media/media.lawrence.com/"
81 MEDIA_ROOT = os.path.join(
82 ROOT_DIR, 'lib', 'python', 'django', 'contrib', 'admin', 'media')
84 TEMPLATE_CONTEXT_PROCESSORS = (
85 "django.core.context_processors.auth",
86 "django.core.context_processors.debug",
87 "django.core.context_processors.i18n",
88 "django.core.context_processors.media")
90 AUTH_PROFILE_MODULE = "patchwork.userprofile"
93 'django.contrib.auth',
94 'django.contrib.contenttypes',
95 'django.contrib.sessions',
96 'django.contrib.sites',
97 'django.contrib.admin',
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
113 from local_settings import *
114 except ImportError, ex:
117 ("settings.py: error importing local settings file:\n" + \
119 "Do you have a local_settings.py module?\n") % str(ex))