forked from opencivicdata/scrapers-ca
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpupa_settings.py
More file actions
38 lines (36 loc) · 1.31 KB
/
Copy pathpupa_settings.py
File metadata and controls
38 lines (36 loc) · 1.31 KB
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
import os
# Use the same directories as scrapers_ca_app.
CACHE_DIR = os.path.join(os.getcwd(), '..', '_cache')
SCRAPED_DATA_DIR = os.path.join(os.getcwd(), '..', '_data')
DATABASE_URL = os.environ.get('DATABASE_URL', 'postgis://localhost/pupa')
os.environ['OCD_DIVISION_CSV'] = os.environ.get('OCD_DIVISION_CSV', os.path.join(os.path.abspath(os.path.dirname(__file__)), 'country-{}.csv'))
# @see https://github.com/opencivicdata/pupa/blob/master/pupa/settings.py
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'standard': {
'format': "%(asctime)s %(levelname)s %(name)s: %(message)s",
'datefmt': '%H:%M:%S'
}
},
'handlers': {
'default': {'level': 'DEBUG',
'class': 'pupa.ext.ansistrm.ColorizingStreamHandler',
'formatter': 'standard'},
},
'loggers': {
'': {
'handlers': ['default'], 'level': 'DEBUG', 'propagate': True # DEBUG
},
'scrapelib': {
'handlers': ['default'], 'level': 'INFO', 'propagate': False # INFO
},
'requests': {
'handlers': ['default'], 'level': 'WARN', 'propagate': False
},
'boto': {
'handlers': ['default'], 'level': 'WARN', 'propagate': False
},
},
}