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'
|
2011-07-03 16:56:05 -07:00
|
|
|
DATETIME_FORMAT = 'Y-m-d H:i'
|
2010-09-14 16:47:12 -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',
|
2011-12-05 21:06:10 -08:00
|
|
|
'django.core.context_processors.static',
|
2010-09-22 21:16:13 -07:00
|
|
|
'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-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',
|
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-12-05 21:06:10 -08:00
|
|
|
# URL to serve static files
|
|
|
|
STATIC_URL = '/static/'
|
|
|
|
|
|
|
|
# Location to collect static files
|
|
|
|
STATIC_ROOT = os.path.join(DEPLOY_PATH, 'collected_static')
|
|
|
|
|
|
|
|
# Look for more static files in these locations
|
|
|
|
STATICFILES_DIRS = (
|
|
|
|
os.path.join(DEPLOY_PATH, 'sitestatic'),
|
|
|
|
)
|
|
|
|
|
2011-08-16 14:30:14 -07:00
|
|
|
# Configure where messages should reside
|
2010-06-20 21:56:01 -07:00
|
|
|
MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'
|
2011-08-16 14:30:14 -07:00
|
|
|
|
|
|
|
# Session configuration
|
2010-08-09 11:33:09 -07:00
|
|
|
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
|
2011-08-16 14:30:14 -07:00
|
|
|
SESSION_COOKIE_HTTPONLY = True
|
2010-08-09 11:33:09 -07:00
|
|
|
|
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',
|
2011-12-05 21:06:10 -08:00
|
|
|
'django.contrib.staticfiles',
|
|
|
|
'south',
|
|
|
|
|
|
|
|
'main',
|
2010-01-31 11:17:03 -08:00
|
|
|
'mirrors',
|
|
|
|
'news',
|
|
|
|
'packages',
|
|
|
|
'todolists',
|
|
|
|
'devel',
|
|
|
|
'public',
|
2011-04-28 15:58:13 -07:00
|
|
|
'releng',
|
2011-10-05 13:45:44 -07:00
|
|
|
'visualize',
|
2012-02-02 12:12:46 -08:00
|
|
|
'retro',
|
2007-11-03 00:45:10 -07:00
|
|
|
)
|
|
|
|
|
2011-11-15 12:37:46 -08:00
|
|
|
## Server used for linking to PGP keysearch results
|
2011-06-02 14:21:08 -07:00
|
|
|
PGP_SERVER = 'pgp.mit.edu:11371'
|
|
|
|
|
2011-11-15 12:37:46 -08:00
|
|
|
# URL to fetch a current list of available ISOs
|
|
|
|
ISO_LIST_URL = 'http://releng.archlinux.org/isos/'
|
|
|
|
|
2011-12-04 08:51:36 -08:00
|
|
|
# URL to the PXE netboot instructions
|
|
|
|
PXEBOOT_URL = 'http://releng.archlinux.org/pxeboot/'
|
|
|
|
|
2011-11-15 12:37:46 -08:00
|
|
|
# URL for SVN access for fetching commit messages (note absence of packages or
|
|
|
|
# community bit on the end, repo.svn_root is appended)
|
|
|
|
SVN_BASE_URL = 'svn+ssh://svn.archlinux.org/srv/svn-'
|
|
|
|
|
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' ]
|
|
|
|
|
2007-12-29 16:42:55 -08:00
|
|
|
# vim: set ts=4 sw=4 et:
|