-
Notifications
You must be signed in to change notification settings - Fork 5
/
config.py.tmpl
47 lines (35 loc) · 2.06 KB
/
config.py.tmpl
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
from os.path import abspath, dirname, join, realpath
from urllib.parse import urlparse
SQLALCHEMY_TRACK_MODIFICATIONS = False
#SQLALCHEMY_DATABASE_URI = 'mysql+oursql://user:[email protected]/iatidq'
#SQLALCHEMY_DATABASE_URI = 'sqlite:///dataquality.sqlite'
#SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2:///iatidq'
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://postgres:dcf5636196aa409b75a0f7a73a314df4c8fc05d9b9fc0cad9b87ee64f2d6d2b1@127.0.0.1:5433/iatidq'
database_uri_parsed = urlparse(SQLALCHEMY_DATABASE_URI)
DATABASE_INFO = {
"user": database_uri_parsed.username,
"password": database_uri_parsed.password,
"database": database_uri_parsed.path[1:],
"host": database_uri_parsed.hostname,
"port": database_uri_parsed.port,
}
SAMPLING_DB_FILENAME = join(realpath(dirname(__file__)), 'sample_work.db')
SECRET_KEY = "YOUR-REALLY-SECRET-KEY"
INDICATOR_GROUP = u"2024index"
CODELIST_API = u"https://reference.iatistandard.org/{version}/codelists/downloads/clv2"
ORG_FREQUENCY_API_URL = "http://publishingstats.iatistandard.org/timeliness_frequency.csv"
IATIUPDATES_URL = "http://tracker.publishwhatyoufund.org/iatiupdates/api/package/hash/"
# if this is set to False, don't be surprised if your database
# becomes ludicrously huge. Heed my words.
REMOVE_RESULTS = True
INTRO_HTML = ''
# INTRO_HTML = 'Data collection for the <a href="http://www.publishwhatyoufund.org/the-index/">2020 Aid Transparency Index</a> has now started. We will release more detailed information in April 2020 when the Aid Transparency Index will be launched. Results and analysis for previous years is available in the <a href="http://ati.publishwhatyoufund.org/" target="_blank">2018 Index</a>.'
ATI_YEAR = '2024'
PREVIOUS_ATI_YEAR = '2022'
basedir = dirname(abspath(__file__))
IATI_DATA_PATH = join(basedir, 'data')
IATI_RESULT_PATH = join(basedir, 'results')
# For local development, the creation of the admin user can be automated by using these config variables
# Use with the --admin-from-config flag of the `flask setup` command
# APP_ADMIN_USERNAME = "admin"
# APP_ADMIN_PASSWORD = "admin"