kopia lustrzana https://github.com/hholzgra/maposmatic/
110 wiersze
3.7 KiB
Python
110 wiersze
3.7 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
|
|
|
|
# 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
|
|
|
|
# Path to the file containing the datetime of the state of the GIS
|
|
# database. It should be of the form YYYY-MM-DD HH:MM:SS.
|
|
GIS_DATABASE_LAG_FILE = '/path/to/gis/database/lag/file'
|
|
|
|
RENDERING_RESULT_PATH = '/path/to/rendering/results/'
|
|
RENDERING_RESULT_URL = '/results/' # Either a relative URL or an absolute URL
|
|
RENDERING_RESULT_FORMATS = ['png', 'svgz', 'pdf', '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'
|
|
|
|
# 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_EMAIL_FROM = 'daemon@domain.com'
|
|
DAEMON_ERRORS_EMAIL_REPLY_TO = 'noreply@domain.com'
|
|
DAEMON_ERRORS_JOB_URL = 'http://domain.com/jobs/%d'
|