2007-12-22 21:35:10 -08:00
|
|
|
import os
|
2009-10-30 11:19:58 -07:00
|
|
|
# Django settings for archweb project.
|
2007-11-03 00:45:10 -07:00
|
|
|
|
|
|
|
## Set the debug values
|
2010-10-05 09:55:30 -07:00
|
|
|
DEBUG = False
|
2007-11-03 00:45:10 -07:00
|
|
|
TEMPLATE_DEBUG = DEBUG
|
2011-03-10 07:34:24 -08:00
|
|
|
DEBUG_TOOLBAR = False
|
2007-11-03 00:45:10 -07:00
|
|
|
|
2010-10-05 09:55:30 -07:00
|
|
|
## Notification admins
|
2011-01-06 08:28:06 -08:00
|
|
|
ADMINS = ()
|
2010-10-05 09:55:30 -07:00
|
|
|
|
2007-11-03 00:45:10 -07:00
|
|
|
# Set managers to admins
|
|
|
|
MANAGERS = ADMINS
|
|
|
|
|
2010-10-19 07:05:26 -07:00
|
|
|
# Package out-of-date emails for orphans
|
2010-10-18 13:00:38 -07:00
|
|
|
NOTIFICATIONS = ['arch-notifications@archlinux.org']
|
|
|
|
|
2007-11-03 00:45:10 -07:00
|
|
|
# Full path to the data directory
|
2007-12-22 21:35:10 -08:00
|
|
|
DEPLOY_PATH = os.path.dirname(os.path.realpath(__file__))
|
2007-11-03 00:45:10 -07:00
|
|
|
|
|
|
|
# Local time zone for this installation. All choices can be found here:
|
|
|
|
# http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
|
|
|
|
TIME_ZONE = 'US/Eastern'
|
|
|
|
|
|
|
|
# Language code for this installation. All choices can be found here:
|
|
|
|
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
|
|
|
|
# http://blogs.law.harvard.edu/tech/stories/storyReader$15
|
|
|
|
LANGUAGE_CODE = 'en-us'
|
2008-04-16 19:51:29 -07:00
|
|
|
DEFAULT_CHARSET = 'utf-8'
|
2007-11-03 00:45:10 -07:00
|
|
|
|
|
|
|
SITE_ID = 1
|
|
|
|
|
2010-09-14 16:47:12 -07:00
|
|
|
# Default date format in templates for 'date' filter
|
|
|
|
DATE_FORMAT = 'Y-m-d'
|
|
|
|
|
2007-11-03 00:45:10 -07:00
|
|
|
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
|
|
|
|
# trailing slash.
|
|
|
|
# Examples: "http://foo.com/media/", "/media/".
|
2007-12-29 14:51:13 -08:00
|
|
|
ADMIN_MEDIA_PREFIX = '/media/admin_media/'
|
2007-11-03 00:45:10 -07:00
|
|
|
|
2011-01-06 08:30:46 -08:00
|
|
|
# Login URL configuration
|
2007-12-26 11:20:24 -08:00
|
|
|
LOGIN_URL = '/login/'
|
2010-05-17 11:29:27 -07:00
|
|
|
LOGIN_REDIRECT_URL = '/'
|
2007-12-26 11:20:24 -08:00
|
|
|
|
2011-01-06 08:30:46 -08:00
|
|
|
# Set django's User stuff to use our profile model
|
|
|
|
AUTH_PROFILE_MODULE = 'main.UserProfile'
|
|
|
|
|
2010-09-22 21:16:13 -07:00
|
|
|
# We add a processor to determine if the request is secure or not
|
|
|
|
TEMPLATE_CONTEXT_PROCESSORS = (
|
|
|
|
'django.contrib.auth.context_processors.auth',
|
|
|
|
'django.core.context_processors.debug',
|
|
|
|
'django.core.context_processors.i18n',
|
|
|
|
'django.core.context_processors.media',
|
|
|
|
'django.contrib.messages.context_processors.messages',
|
|
|
|
'main.context_processors.secure',
|
|
|
|
)
|
|
|
|
|
2011-03-10 10:00:59 -08:00
|
|
|
TEMPLATE_DIRS = (
|
|
|
|
# Put strings here, like "/home/html/django_templates".
|
|
|
|
# Always use forward slashes, even on Windows.
|
|
|
|
'%s/templates' % DEPLOY_PATH,
|
|
|
|
)
|
|
|
|
|
|
|
|
TEMPLATE_LOADERS = (
|
|
|
|
'django.template.loaders.filesystem.Loader',
|
|
|
|
'django.template.loaders.eggs.Loader',
|
|
|
|
'django.template.loaders.app_directories.Loader',
|
|
|
|
)
|
|
|
|
|
2010-09-07 14:04:56 -07:00
|
|
|
# This bug is a real bummer:
|
|
|
|
# http://code.djangoproject.com/ticket/14105
|
2007-11-03 00:45:10 -07:00
|
|
|
MIDDLEWARE_CLASSES = (
|
2010-05-04 08:53:40 -07:00
|
|
|
'main.middleware.UpdateCacheMiddleware',
|
2010-09-14 15:41:46 -07:00
|
|
|
'django.middleware.common.CommonMiddleware',
|
2010-08-09 11:32:41 -07:00
|
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
2010-06-05 10:58:31 -07:00
|
|
|
'django.middleware.csrf.CsrfViewMiddleware',
|
2010-08-09 11:32:41 -07:00
|
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
2010-09-14 15:41:46 -07:00
|
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
2007-11-03 00:45:10 -07:00
|
|
|
'django.middleware.http.ConditionalGetMiddleware',
|
2010-08-09 11:32:41 -07:00
|
|
|
'django.middleware.doc.XViewMiddleware',
|
2009-11-09 16:30:40 -08:00
|
|
|
'django.middleware.cache.FetchFromCacheMiddleware',
|
2007-11-03 00:45:10 -07:00
|
|
|
)
|
|
|
|
|
2010-01-31 11:17:03 -08:00
|
|
|
ROOT_URLCONF = 'urls'
|
2007-11-03 00:45:10 -07:00
|
|
|
|
2011-01-06 08:30:46 -08:00
|
|
|
# Configure where sessions and messages should reside
|
2010-06-20 21:56:01 -07:00
|
|
|
MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'
|
2010-08-09 11:33:09 -07:00
|
|
|
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
|
|
|
|
|
2007-11-03 00:45:10 -07:00
|
|
|
INSTALLED_APPS = (
|
|
|
|
'django.contrib.auth',
|
|
|
|
'django.contrib.contenttypes',
|
2010-06-20 21:56:01 -07:00
|
|
|
'django.contrib.messages',
|
2007-11-03 00:45:10 -07:00
|
|
|
'django.contrib.sessions',
|
|
|
|
'django.contrib.sites',
|
2009-10-30 14:36:42 -07:00
|
|
|
'django.contrib.sitemaps',
|
2007-11-03 00:45:10 -07:00
|
|
|
'django.contrib.admin',
|
2010-07-06 18:16:10 -07:00
|
|
|
'django.contrib.markup',
|
2010-01-31 11:17:03 -08:00
|
|
|
'main', # contains shared models and libs
|
|
|
|
'mirrors',
|
|
|
|
'news',
|
|
|
|
'packages',
|
|
|
|
'todolists',
|
|
|
|
'devel',
|
|
|
|
'public',
|
2010-01-31 11:20:49 -08:00
|
|
|
'south', # database migration support
|
2011-04-28 15:58:13 -07:00
|
|
|
'releng',
|
2007-11-03 00:45:10 -07:00
|
|
|
)
|
|
|
|
|
2010-10-05 09:55:30 -07:00
|
|
|
## Import local settings
|
|
|
|
from local_settings import *
|
|
|
|
|
|
|
|
# Enable caching templates in production environments
|
|
|
|
if not TEMPLATE_DEBUG:
|
|
|
|
TEMPLATE_LOADERS = (
|
|
|
|
('django.template.loaders.cached.Loader', TEMPLATE_LOADERS),
|
|
|
|
)
|
|
|
|
|
2011-03-10 07:34:24 -08:00
|
|
|
# Enable the debug toolbar if requested
|
|
|
|
if DEBUG_TOOLBAR:
|
|
|
|
MIDDLEWARE_CLASSES = \
|
|
|
|
[ 'debug_toolbar.middleware.DebugToolbarMiddleware' ] + \
|
|
|
|
list(MIDDLEWARE_CLASSES)
|
|
|
|
|
|
|
|
INSTALLED_APPS = list(INSTALLED_APPS) + [ 'debug_toolbar' ]
|
|
|
|
|
2011-04-28 11:59:53 -07:00
|
|
|
# URL to fetch a current list of available ISOs
|
|
|
|
ISO_LIST_URL = 'http://releng.archlinux.org/isos/'
|
2011-04-28 10:43:01 -07:00
|
|
|
|
2007-12-29 16:42:55 -08:00
|
|
|
# vim: set ts=4 sw=4 et:
|