-
Notifications
You must be signed in to change notification settings - Fork 27
/
config-example.py
57 lines (43 loc) · 1.71 KB
/
config-example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import sys
import os
import logging
# The application secret key
SECRET_KEY = 'CHANGE THIS'
# The OAuth configuration paramters for OSM.
OSM = {
'base_url': 'https://master.apis.dev.openstreetmap.org/api/0.6/',
'request_token_url': 'https://master.apis.dev.openstreetmap.org/oauth/request_token',
'access_token_url': 'https://master.apis.dev.openstreetmap.org/oauth/access_token',
'authorize_url': 'https://master.apis.dev.openstreetmap.org/oauth/authorize',
'consumer_key': 'CHANGE THIS',
'consumer_secret': 'CHANGE_THIS'
}
# Set debugging mode. This is detected by looking at the 'runserver' argument passed to manage.py
DEBUG = (len(sys.argv)>1 and sys.argv[1] == 'runserver')
# This is the buffer for looking for tasks / challenges near the given
# lon/lat
NEARBUFFER = 0.01
# this is the threshold in square degrees
# for considering a challenge 'local'
MAX_SQ_DEGREES_FOR_LOCAL = 10
# The database connection
SQLALCHEMY_DATABASE_URI = "postgresql://osm:osm@localhost/maproulette"
# Logging details
LOGFILE = os.path.join(os.path.expanduser('~'), '/tmp/maproulette.log')
LOGLEVEL = logging.DEBUG if DEBUG else logging.INFO
# the default challenge to run
DEFAULT_CHALLENGE = 'CHANGE_THIS'
# IP Whitelist for external API calls
# (/api/admin/*, /api/stats*, /api/users, /api/challenges)
IP_WHITELIST = []
# Service API keys
MAILGUN_API_KEY = 'CHANGE THIS'
# URL to the metrics site instance, for allowing CORS requests from there
METRICS_URL = 'http://metrics.maproulette.org/'
# Max number of tasks in a bulk task update
MAX_TASKS_BULK_UPDATE = 5000
# Basic Authentication user / pass
AUTHORIZED_USER = 'testuser'
AUTHORIZED_PASSWORD = 'password'
# SQLAlchemy defaults
SQLALCHEMY_TRACK_MODIFICATIONS = False