maposmatic/www/settings_local.py.dist

156 wiersze
5.1 KiB
Python

#!/usr/bin/env python
# coding: utf-8
# maposmatic, the web front-end of the MapOSMatic city map generation system
# Copyright (C) 2009 David Decotigny
# Copyright (C) 2009 Frédéric Lehobey
# Copyright (C) 2009 David Mentré
# Copyright (C) 2009 Maxime Petazzoni
# Copyright (C) 2009 Thomas Petazzoni
# Copyright (C) 2009 Gaël Utard
# Copyright (C) 2019 Hartmut Holzgraefe
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import logging
import os
import sys
# Optional: if you need to extend the Python search path, for example to
# include your OCitySMap installation, then write something like the following:
# sys.path.append('/path/to/ocitysmap')
# sys.path.append('/path/to/lib/python/site-packages')
DEBUG = True
ADMINS = (
('MapOSMatic admin', 'contact@your.domain'),
)
DATABASES = {
# For SQLite:
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(os.path.dirname(__file__),
'datastore.sqlite3'),
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': ''
},
# For PostgreSQL:
#'default': {
# 'ENGINE': 'django.db.backends.postgresql_psycopg2',
# 'NAME': 'maposmatic',
# 'USER': 'maposmatic',
# 'PASSWORD': 'secret',
# 'HOST': 'localhost',
# 'PORT': '5432'
# },
}
# Path to ocitysmap's config file to use, or None for the default
# (~/.ocitysmap.conf)
OCITYSMAP_CFG_PATH = None
RENDERING_RESULT_PATH = '/path/to/rendering/results/'
RENDERING_RESULT_URL = '/results/' # Either a relative URL or an absolute URL
RENDERING_RESULT_FORMATS = ['pdf', 'svgz', 'png', 'csv']
RENDERING_RESULT_MAX_SIZE_GB = 10
# Default output log file when the env variable MAPOSMATIC_LOG_FILE is not set
DEFAULT_MAPOSMATIC_LOG_FILE = '/path/to/maposmatic/logs/maposmatic.log'
# Default log level when the env variable DEFAULT_MAPOSMATIC_LOG_LEVEL
# is not set
DEFAULT_MAPOSMATIC_LOG_LEVEL = logging.INFO
DEFAULT_MAPOSMATIC_LOG_FORMAT = "%(asctime)s - %(name)s@%(process)d - %(levelname)s - %(message)s"
# Base bounding box
BASE_BOUNDING_BOX = (51.956, -7.838, 41.458, 11.937)
# Maximum length of the bounding box to be rendered. This length is
# checked in both directions (longitude and latitude).
# Note: if you change this you should probably change
# BBOX_MAXIMUM_LENGTH_IN_KM in osm_map.js too.
BBOX_MAXIMUM_LENGTH_IN_METERS = 20000
# Number of items displayed per page in the jobs and maps pages
ITEMS_PER_PAGE = 25
# PID file location for the rendering daemon associated with this
# instance; normally managed by the /etc/init.d scripts such as
# start-stop-daemon(8) in debian systems:
MAPOSMATIC_PID_FILE = '/var/run/maposmaticd.pid'
# Feed URL for the RRS feed on the front page
FRONT_PAGE_FEED = 'http://blog.osm-baustelle.de/index.php/feed/?cat=2'
# Settings for exception emails: the from email address, and the list of
# receipient email addresses. No emails are sent if the SMTP host is not
# defined.
DAEMON_ERRORS_SMTP_HOST = None
DAEMON_ERRORS_SMTP_PORT = 25
DAEMON_ERRORS_SMTP_ENCRYPT = None
DAEMON_ERRORS_SMTP_USER = None
DAEMON_ERRORS_SMTP_PASSWORD = None
DAEMON_ERRORS_EMAIL_FROM = 'daemon@example.com'
DAEMON_ERRORS_EMAIL_REPLY_TO = 'noreply@example.com'
DAEMON_ERRORS_JOB_URL = 'http://example.com/jobs/%d'
# example email settings for using a Google Mail account
# DAEMON_ERRORS_SMTP_HOST = 'smtp.googlemail.com'
# DAEMON_ERRORS_SMTP_PORT = 587
# DAEMON_ERRORS_SMTP_ENCRYPT = 'TLS'
# DAEMON_ERRORS_SMTP_USER = '...@gmail.com'
# DAEMON_ERRORS_SMTP_PASSWORD = "..."
# DAEMON_ERRORS_EMAIL_FROM = '...@gmail.com'
# DAEMON_ERRORS_EMAIL_REPLY_TO = '...@gmail.com'
# DAEMON_ERRORS_JOB_URL = 'http://example.com/jobs/%d'
# highest rendering request ID still using the old filename scheme
# before the switch to sluggify
LAST_OLD_ID = 0
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = '/home/media/media.lawrence.com/'
# put a PayPal "hosted_button_id" here to enable the donation page
# see also: https://developer.paypal.com/docs/integration/web/
# e.g. PAYPAL_ID = 'YQPBAUM3JW8T2' # original MapOSMatic doation ID
PAYPAL_ID = ''
# Piwik base URL - enable tracking if set
# exclude http:/https:, this will be added dynamically
# example: PIWIK_BASE_URL = '//stats.maposmatic.org/piwik/'
PIWIK_BASE_URL = ''
# contact information, to be displayed in page footer if set
CONTACT_EMAIL = 'hartmut@php.net'
CONTACT_CHAT = 'irc://irc.freenode.net/#maposmatic'
# custom footer text
EXTRA_FOOTER = ''
# show this in a warning box on top of the page when set
MAINTENANCE_NOTICE = ''