# Django settings for patchwork project.
+import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
# to load the internationalization machinery.
USE_I18N = True
-# Absolute path to the directory that holds media.
-# Example: "/home/media/media.lawrence.com/"
-MEDIA_ROOT = '/srv/patchwork/lib/python/django/contrib/admin/media'
-
# URL that handles the media served from MEDIA_ROOT.
# Example: "http://media.lawrence.com"
MEDIA_URL = ''
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
+ 'django.middleware.csrf.CsrfViewMiddleware',
)
ROOT_URLCONF = 'apps.urls'
-LOGIN_URL = '/accounts/login'
+LOGIN_URL = '/user/login/'
LOGIN_REDIRECT_URL = '/user/'
+# If you change the ROOT_DIR setting in your local_settings.py, you'll need to
+# re-define the variables that use this (MEDIA_ROOT and TEMPLATE_DIRS) too.
+ROOT_DIR = '/srv/patchwork'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
- '/srv/patchwork/templates'
+ os.path.join(ROOT_DIR, 'templates')
)
+# Absolute path to the directory that holds media.
+# Example: "/home/media/media.lawrence.com/"
+MEDIA_ROOT = os.path.join(
+ ROOT_DIR, 'lib', 'python', 'django', 'contrib', 'admin', 'media')
+
TEMPLATE_CONTEXT_PROCESSORS = (
"django.core.context_processors.auth",
"django.core.context_processors.debug",
'django.contrib.sites',
'django.contrib.admin',
'patchwork',
- 'registration',
)
DEFAULT_PATCHES_PER_PAGE = 100
DEFAULT_FROM_EMAIL = 'Patchwork <patchwork@patchwork.example.com>'
-ACCOUNT_ACTIVATION_DAYS = 7
+CONFIRMATION_VALIDITY_DAYS = 7
# Set to True to enable the Patchwork XML-RPC interface
ENABLE_XMLRPC = False