1
- # The application secret key
2
-
3
- # http://www.thedutchtable.com/2013/03/een-ei-is-geen-eivrolijk-pasen.html
4
- SECRET_KEY = 'REPLACE WITH YOUR APPLICATION SECRET KEY'
5
-
6
1
{% if is_dev -%}
7
2
{% set db = "maproulette_dev" -%}
8
3
{% set cors_url = "http://maproulette-metrics-stage.s3-website-us-east-1.amazonaws.com/" -%}
4
+ {% set osm_url = "http://api06.dev.openstreetmap.org" -%}
9
5
{% else -%}
10
6
{% set db = "maproulette" -%}
11
7
{% set cors_url = "http://maproulette-metrics-production.s3-website-us-east-1.amazonaws.com/" -%}
8
+ {% set osm_url = "https://www.openstreetmap.org" -%}
12
9
{% endif -%}
10
+ import sys
11
+ import os
12
+ import logging
13
13
14
- # The database connection
15
- SQLALCHEMY_DATABASE_URI = "postgresql://osm:osm@localhost/{{db}}"
14
+ # The application secret key
15
+ SECRET_KEY = 'CHANGEME'
16
16
17
- # show a teaser page instead of the real thing
18
- TEASER = False
19
- # the text that should go into the teaser
20
- TEASER_TEXT = 'New MapRoulette Challenges coming SOON!'
17
+ # The OAuth configuration paramters for OSM.
21
18
22
- import logging
23
- LOGFILE = '/srv/www/{{instance}}/log/maproulette.log'
24
- LOGLEVEL = logging.DEBUG
19
+ OSM = {
20
+ 'base_url': '{{osm_url}}/api/0.6/',
21
+ 'request_token_url':
22
+ '{{osm_url}}/oauth/request_token',
23
+ 'access_token_url': '{{osm_url}}/oauth/access_token',
24
+ 'authorize_url': '{{osm_url}}/oauth/authorize',
25
+ 'consumer_key': 'CHANGEME',
26
+ 'consumer_secret': 'CHANGEME'
27
+ }
25
28
26
- # by default, disable Flask debug and testing modes
27
- DEBUG = True
28
- TESTING = True
29
+ # Set debugging mode. This is detected by looking at the 'runserver' argument passed to manage.py
30
+ DEBUG = (sys.argv[1] == 'runserver')
29
31
30
32
# This is the buffer for looking for tasks / challenges near the given
31
33
# lon/lat
@@ -35,47 +37,29 @@ NEARBUFFER = 0.01
35
37
# for considering a challenge 'local'
36
38
MAX_SQ_DEGREES_FOR_LOCAL = 10
37
39
38
- from datetime import timedelta
39
-
40
- # The expiration threshold for tasks that are 'assigned' or 'editing'
41
- TASK_EXPIRATION_THRESHOLD = timedelta(hours=1)
42
-
43
- # The expiration threshold for tasks that are 'assigned' or 'editing'
44
- TASK_EXPIRATION_THRESHOLD = timedelta(hours=1)
40
+ # The database connection
41
+ SQLALCHEMY_DATABASE_URI = "postgresql://osm:osm@localhost/{{db}}"
45
42
46
- # The time buffer between a task marked as fixed and the timestamp on the
47
- # changeset in OSM. (Used in validation)
48
- MAX_CHANGESET_OFFSET = timedelta(hours=1)
43
+ # Logging details
44
+ LOGFILE = '/srv/www/{{instance}}/log/maproulette.log'
45
+ LOGLEVEL = logging.DEBUG if DEBUG else logging.INFO
49
46
50
47
# the default challenge to run
51
- DEFAULT_CHALLENGE = 'test1'
52
-
53
- # The OAuth configuration paramters for OSM.
54
- {% if is_dev -%}
55
- {% set osm_url = "http://api06.dev.openstreetmap.org" -%}
56
- {% else -%}
57
- {% set osm_url = "https://www.openstreetmap.org" -%}
58
- {% endif -%}
59
-
60
- OSM = {
61
- 'base_url': '{{osm_url}}/api/0.6/',
62
- 'request_token_url':
63
- '{{osm_url}}/oauth/request_token',
64
- 'access_token_url': '{{osm_url}}/oauth/access_token',
65
- 'authorize_url': '{{osm_url}}/oauth/authorize',
66
- 'consumer_key': '{{consumer_key}}',
67
- 'consumer_secret': '{{consumer_secret}}'
68
- }
69
-
70
- # The MailGun API KEY
71
- MAILGUN_API_KEY = 'REPLACE WITH YOUR MAILGUN API KEY'
48
+ DEFAULT_CHALLENGE = 'CHANGEME'
72
49
73
50
# IP Whitelist for external API calls
74
51
# (/api/admin/*, /api/stats*, /api/users, /api/challenges)
75
- IP_WHITELIST = [ ]
52
+ IP_WHITELIST = []
76
53
77
- # Max number of tasks in a bulk update call
78
- MAX_TASKS_BULK_UPDATE = 5000
54
+ # Service API keys
55
+ MAILGUN_API_KEY = 'CHANGEME'
79
56
80
57
# URL to the metrics site instance, for allowing CORS requests from
81
- METRICS_URL = '{{cors_url}}'
58
+ METRICS_URL = '{{cors_url}}'
59
+
60
+ # Max number of tasks in a bulk task update
61
+ MAX_TASKS_BULK_UPDATE = 5000
62
+
63
+ # Basic Authentication user / pass
64
+ AUTHORIZED_USER = 'CHANGEME'
65
+ AUTHORIZED_PASSWORD = 'CHANGEME'
0 commit comments