summaryrefslogtreecommitdiff
path: root/chimere/settings.sample.py
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/settings.sample.py')
-rw-r--r--chimere/settings.sample.py87
1 files changed, 45 insertions, 42 deletions
diff --git a/chimere/settings.sample.py b/chimere/settings.sample.py
index 2203c17..16de0f1 100644
--- a/chimere/settings.sample.py
+++ b/chimere/settings.sample.py
@@ -11,7 +11,7 @@ TEMPLATE_DEBUG = DEBUG
MOBILE_TEST = False
# Django settings for chimere project.
-PROJECT_NAME = 'Chimere'
+PROJECT_NAME = u'Chimère'
ROOT_PATH = os.path.realpath(os.path.dirname(__file__)) + "/"
EMAIL_HOST = 'localhost'
@@ -80,6 +80,8 @@ CHIMERE_SHAPEFILE_ENCODING = 'ISO-8859-1'
# it could be a good idea to hide it to an admin who could'nt do that
CHIMERE_HIDE_PROPERTYMODEL = False
+CHIMERE_ENABLE_CLUSTERING = False
+
# enable routing in Chimère
CHIMERE_ENABLE_ROUTING = False
@@ -228,52 +230,53 @@ INSTALLED_APPS += [
LOG_PATH = '/var/log/django/'
MOBILE_DOMAINS = [] # if you have specific domains for mobile access
+LOGFILENAME = '/var/log/django/chimere.log'
+
+LOGGING = {'version': 1,
+ 'disable_existing_loggers': False,
+ 'handlers': {
+ # Include the default Django email handler for errors
+ # This is what you'd get without configuring logging at all.
+ 'mail_admins': {
+ 'class': 'django.utils.log.AdminEmailHandler',
+ 'level': 'ERROR',
+ # But the emails are plain text by default - HTML is nicer
+ 'include_html': True,
+ },
+ # Log to a text file that can be rotated by logrotate
+ 'logfile': {
+ 'class': 'logging.handlers.WatchedFileHandler',
+ 'filename': '/var/log/django/chimere.log'
+ },
+ },
+ 'loggers': {
+ # Again, default Django configuration to email unhandled exceptions
+ 'django.request': {
+ 'handlers': ['mail_admins'],
+ 'level': 'ERROR',
+ 'propagate': True,
+ },
+ # Might as well log any errors anywhere else in Django
+ 'django': {
+ 'handlers': ['logfile'],
+ 'level': 'ERROR',
+ 'propagate': False,
+ },
+ # Your own app - this assumes all your logger names start with "myapp."
+ 'chimere': {
+ 'handlers': ['logfile'],
+ 'level': 'WARNING', # Or maybe INFO or DEBUG
+ 'propogate': False
+ },
+ },
+}
+
try:
from local_settings import *
except ImportError, e:
print 'Unable to load local_settings.py:', e
-if 'LOGGING' not in globals():
- global LOGGING
- LOGGING = {'version': 1,
- 'disable_existing_loggers': False,
- 'handlers': {
- # Include the default Django email handler for errors
- # This is what you'd get without configuring logging at all.
- 'mail_admins': {
- 'class': 'django.utils.log.AdminEmailHandler',
- 'level': 'ERROR',
- # But the emails are plain text by default - HTML is nicer
- 'include_html': True,
- },
- # Log to a text file that can be rotated by logrotate
- 'logfile': {
- 'class': 'logging.handlers.WatchedFileHandler',
- 'filename': LOG_PATH + 'chimere.log'
- },
- },
- 'loggers': {
- # Again, default Django configuration to email unhandled exceptions
- 'django.request': {
- 'handlers': ['mail_admins'],
- 'level': 'ERROR',
- 'propagate': True,
- },
- # Might as well log any errors anywhere else in Django
- 'django': {
- 'handlers': ['logfile'],
- 'level': 'ERROR',
- 'propagate': False,
- },
- # Your own app - this assumes all your logger names start with "myapp."
- 'chimere': {
- 'handlers': ['logfile'],
- 'level': 'WARNING', # Or maybe INFO or DEBUG
- 'propogate': False
- },
- },
- }
-
+LOGGING['handlers']['logfile']['filename'] = LOGFILENAME
if 'CHIMERE_SHARE_NETWORKS' not in globals():
# after the locals to get the right STATIC_URL