Moved common to public
[archweb_dev-nj.git] / settings.py
blob1c858ea06e69eae96dad5e0daf97aa8cd3e42f0a
1 import os
2 # Django settings for archweb_dev project.
4 ## Import local settings
5 from local_settings import *
7 ## Set the debug values
8 TEMPLATE_DEBUG = DEBUG
10 # Set managers to admins
11 MANAGERS = ADMINS
13 ## Cache backend settings
14 if ENABLE_CACHE == True:
15 CACHE_BACKEND = 'file:///tmp/ALdjangocache?timeout=900'
16 CACHE_MIDDLEWARE_SECONDS = 900
17 CACHE_MIDDLEWARE_KEY_PREFIX = 'arch'
18 CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True
20 # Full path to the data directory
21 DEPLOY_PATH = os.path.dirname(os.path.realpath(__file__))
22 DATA_DIR = '%s/data' % DEPLOY_PATH
24 # Local time zone for this installation. All choices can be found here:
25 # http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
26 TIME_ZONE = 'US/Eastern'
28 # Language code for this installation. All choices can be found here:
29 # http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
30 # http://blogs.law.harvard.edu/tech/stories/storyReader$15
31 LANGUAGE_CODE = 'en-us'
33 SITE_ID = 1
35 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
36 # trailing slash.
37 # Examples: "http://foo.com/media/", "/media/".
38 ADMIN_MEDIA_PREFIX = '/media/admin_media/'
40 # URL to send users when they don't have sufficient privileges
41 BADPRIVS_URL = '/denied/'
43 # login url
44 LOGIN_URL = '/login/'
46 # List of callables that know how to import templates from various sources.
47 TEMPLATE_LOADERS = (
48 'django.template.loaders.filesystem.load_template_source',
49 'django.template.loaders.app_directories.load_template_source',
50 # 'django.template.loaders.eggs.load_template_source',
53 MIDDLEWARE_CLASSES = (
54 "django.contrib.sessions.middleware.SessionMiddleware",
55 "django.contrib.auth.middleware.AuthenticationMiddleware",
56 'django.middleware.http.ConditionalGetMiddleware',
59 # A bit of hackery to insert caching at the right spot
60 if ENABLE_CACHE == True:
61 MIDDLEWARE_CLASSES += ('django.middleware.cache.CacheMiddleware',)
63 MIDDLEWARE_CLASSES += (
64 "django.middleware.common.CommonMiddleware",
65 "django.middleware.doc.XViewMiddleware",
68 ROOT_URLCONF = 'archweb_dev.urls'
70 TEMPLATE_DIRS = (
71 # Put strings here, like "/home/html/django_templates".
72 # Always use forward slashes, even on Windows.
73 '%s/templates' % DEPLOY_PATH,
76 # Set django's User stuff to use our profile model
77 # format is app.model
78 AUTH_PROFILE_MODULE = 'public.UserProfile'
80 INSTALLED_APPS = (
81 'django.contrib.auth',
82 'django.contrib.contenttypes',
83 'django.contrib.sessions',
84 'django.contrib.sites',
85 'django.contrib.admin',
86 'archweb_dev.news',
87 'archweb_dev.packages',
88 'archweb_dev.public',
89 'archweb_dev.todolists',
90 'archweb_dev.devel',
91 'archweb_dev.wiki'