-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path_config.py
66 lines (56 loc) · 2.01 KB
/
_config.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
58
59
60
61
62
63
64
65
66
import os
class Config(object):
# app
SECRET_KEY = os.environ.get("SECRET_KEY") or "YOUR_SECRET_KEY"
# database
SQLALCHEMY_DATABASE_URI = (
os.environ.get("SQL_ALCHEMY_DATABASE_URI")
or "postgresql://postgres:PASS@localhost/yamz"
)
SQLALCHEMY_TRACK_MODIFICATIONS = False
# oauth
OAUTH_CREDENTIALS = {
"google": {
"id": "YOUR_GOOGLE_API_ID.apps.googleusercontent.com",
"secret": "YOUR_GOOGLE_API_SECRET",
},
"orcid": {
"id": "APP-YOUR_ORCID_API_ID",
"secret": "YOUR_ORCID_API_SECRET",
},
}
OAUTH_URLS = {
"orcid": {
"authorize_url": "https://orcid.org/oauth/authorize",
"access_token_url": "https://orcid.org/oauth/token",
"base_url": "https://orcid.org/v3.0/",
"user_info_url": "https://pub.orcid.org/3.0/{}/person",
},
"google": {
"authorize_url": "https://accounts.google.com/o/oauth2/auth",
"access_token_url": "https://accounts.google.com/o/oauth2/token",
"base_url": "https://www.google.com/accounts/",
"user_info_url": "https://www.googleapis.com/oauth2/v2/userinfo",
},
}
# misc
SANDBOX = False
TERMS_PER_PAGE = 20
# ark related settings
SHOULDER = "h"
ARK_PREFIX = "ark:/99152/"
NAAN = "YOUR_NAAN"
# mail
MAIL_SERVER = os.environ.get("MAIL_SERVER") or "smtp.mailgun.org"
MAIL_PORT = int(os.environ.get("MAIL_PORT") or 587)
MAIL_USE_TLS = os.environ.get("MAIL_USE_TLS") or True
MAIL_USERNAME = os.environ.get("MAIL_USERNAME") or "[email protected]"
MAIL_PASSWORD = (
os.environ.get("MAIL_PASSWORD")
or "YOUR_MAILGUN_API_KEY"
)
ADMINS = ["ADMIN_EMAIL_ADDRESS"]
# logging - set to True to see error messages on Flask console
# set to False for public-facing service to capture messages in logs/...
# files (directory and files will be created automatically)
LOG_TO_STDOUT = True