Ticket #7002: settings.py

File settings.py, 5.5 KB (added by Hilbert Schraal <hilbert@…>, 17 years ago)
Line 
1# Django settings for rvucms project.
2import logging
3
4
5#----------------------------------------------------------------------------------------------#
6# Below are the settings that most likely change per environment #
7#----------------------------------------------------------------------------------------------#
8
9#DEBUG needs to be 'False' on environments other than development
10# NOTE: with DEBUG = True, some settings are overridden ot the bottom of this file.
11DEBUG = True
12TEMPLATE_DEBUG = DEBUG
13
14# logging configuratie
15LOG_LEVEL = logging.WARN
16LOG_FILE = '/var/log/rvucms/rvucms.log'
17
18DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
19DATABASE_NAME = 'rvu-cms' # Or path to database file if using sqlite3.
20DATABASE_USER = 'rvu-cms' # Not used with sqlite3.
21DATABASE_PASSWORD = 'rvu-cms' # Not used with sqlite3.
22DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
23DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
24
25# location of the cache. Needs to be an absolute path
26CACHE_BACKEND = 'file:///tmp/django_cache'
27
28# Absolute path to the directory that holds media.
29# Example: "/home/media/media.lawrence.com/"
30MEDIA_ROOT = '/var/data/work/rvucms-media/'
31
32TEMPLATE_DIRS = (
33 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
34 # Always use forward slashes, even on Windows.
35 # Don't forget to use absolute paths, not relative paths.
36 "/home/schraal/hippe-it/projects/rvucms/cms/templates",
37)
38
39#----------------------------------------------------------------------------------------------#
40# DO NOT CHANGE THE SETTINGS BELOW HERE, UNLESS YOU KNOW WHAT YOU'RE DOING #
41#----------------------------------------------------------------------------------------------#
42
43CACHE_MIDDLEWARE_SECONDS = 300
44CACHE_MIDDLEWARE_KEY_PREFIX = 'rvucms'
45CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True
46
47ADMINS = (
48 # ('Your Name', 'your_email@domain.com'),
49)
50
51MANAGERS = ADMINS
52
53# Local time zone for this installation. Choices can be found here:
54# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
55# although not all variations may be possible on all operating systems.
56# If running in a Windows environment this must be set to the same as your
57# system time zone.
58TIME_ZONE = 'Europe/Amsterdam'
59
60# Language code for this installation. All choices can be found here:
61# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
62# http://blogs.law.harvard.edu/tech/stories/storyReader$15
63LANGUAGE_CODE = 'nl-nl'
64
65DATETIME_FORMAT = 'd-m-Y H:i'
66
67# If you set this to False, Django will make some optimizations so as not
68# to load the internationalization machinery.
69USE_I18N = True
70
71APPEND_SLASH = True
72
73# URL that handles the media served from MEDIA_ROOT.
74# Example: "http://media.lawrence.com"
75MEDIA_URL = ''
76
77# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
78# trailing slash.
79# Examples: "http://foo.com/media/", "/media/".
80ADMIN_MEDIA_PREFIX = '/media/'
81
82# Make this unique, and don't share it with anybody.
83SECRET_KEY = 'iu720@5n*ax^=z@d(5w+m)kpcjffne(pvb+#6w2s_pz*5)b%$f'
84
85# List of callables that know how to import templates from various sources.
86TEMPLATE_LOADERS = (
87 'django.template.loaders.filesystem.load_template_source',
88 'django.template.loaders.app_directories.load_template_source',
89# 'django.template.loaders.eggs.load_template_source',
90)
91
92TEMPLATE_CONTEXT_PROCESSORS = (
93 'django.core.context_processors.auth',
94 'django.core.context_processors.debug',
95 'django.core.context_processors.i18n',
96)
97
98MIDDLEWARE_CLASSES = (
99 'django.middleware.common.CommonMiddleware',
100 'django.contrib.sessions.middleware.SessionMiddleware',
101 'django.contrib.auth.middleware.AuthenticationMiddleware',
102 'django.middleware.doc.XViewMiddleware',
103 'django.middleware.cache.CacheMiddleware',
104)
105
106ROOT_URLCONF = 'rvucms.urls'
107
108INSTALLED_APPS = (
109 'rvucms.cms',
110 'django.contrib.admin',
111 'django.contrib.auth',
112 'django.contrib.contenttypes',
113 'django.contrib.sessions',
114 'rvucms.upload'
115)
116
117## override some properties for development.
118if DEBUG:
119 LOG_LEVEL = logging.DEBUG
120 LOG_FILE = '/tmp/rvucms.log'
121
122 DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
123 DATABASE_NAME = 'rvu-cms' # Or path to database file if using sqlite3.
124 DATABASE_USER = 'rvu-cms' # Not used with sqlite3.
125 DATABASE_PASSWORD = 'rvu-cms' # Not used with sqlite3.
126 DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
127 DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
128
129 CACHE_BACKEND = 'file:///tmp/django_cache'
130 CACHE_MIDDLEWARE_SECONDS = 0
131
132 # Absolute path to the directory that holds media.
133 # Example: "/home/media/media.lawrence.com/"
134 MEDIA_ROOT = '/var/data/work/rvucms-media/'
135
136 TEMPLATE_DIRS = (
137 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
138 # Always use forward slashes, even on Windows.
139 # Don't forget to use absolute paths, not relative paths.
140 "/home/schraal/hippe-it/projects/rvucms/cms/templates",
141 )
142
143logging.basicConfig(level=LOG_LEVEL,
144 format='%(asctime)s %(levelname)s %(message)s',
145 filename=LOG_FILE,
146 filemode='w')
Back to Top