diff options
Diffstat (limited to 'chimere/settings.sample.py')
-rw-r--r-- | chimere/settings.sample.py | 101 |
1 files changed, 58 insertions, 43 deletions
diff --git a/chimere/settings.sample.py b/chimere/settings.sample.py index aa44f5a..1ddeca6 100644 --- a/chimere/settings.sample.py +++ b/chimere/settings.sample.py @@ -9,9 +9,10 @@ _ = lambda s: s DEBUG = False 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' @@ -50,6 +51,10 @@ CHIMERE_DISPLAY_MAPS = True # don't forget to run the upgrade.py script to create appropriate fields in # the database CHIMERE_DAYS_BEFORE_EVENT = 30 +# Dated events must usualy be checked as 'front page' to be displayed +# on front page - set CHIMERE_ALL_DATED_ARE_FRONT to True if you want to +# display all events on front page +CHIMERE_ALL_DATED_ARE_FRONT = False # allow feeds CHIMERE_FEEDS = True @@ -119,6 +124,15 @@ CHIMERE_NOMINATIM_FIELDS = {} CHIMERE_THUMBS_SCALE_HEIGHT=250 CHIMERE_THUMBS_SCALE_WIDTH=None +# search engine +CHIMERE_SEARCH_ENGINE = False +HAYSTACK_CONNECTIONS = { + 'default': { + 'ENGINE': 'haystack.backends.solr_backend.SolrEngine', + 'URL': 'http://127.0.0.1:8080/solr' + }, +} + CHIMERE_CSV_ENCODING = 'ISO-8859-1' CHIMERE_DEFAULT_ACTIONS = ['view', 'contribute', 'rss', 'contact'] @@ -234,7 +248,48 @@ INSTALLED_APPS += [ 'chimere', ] -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 + }, + }, +} CHIMERE_VIEW_RENDERER = 'openlayers' # 'openlayers' or 'leaflet' CHIMERE_EDIT_RENDERER = 'openlayers' # 'openlayers' @@ -244,47 +299,7 @@ try: 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 |