File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
databank/management/commands/sources Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 33import logging
44
55import requests
6+ from django .conf import settings
67
78from databank .models import Month , PastCrisesEvent , PastEpidemic
89
910from .utils import catch_error , get_country_by_iso3
1011
1112logger = logging .getLogger (__name__ )
1213
13- DISASTER_API = "https://api.reliefweb.int/v1/disasters/?appname=IFRCReport" # Change it to an env var
14+ DISASTER_API = f "https://api.reliefweb.int/v1/disasters/?appname={ settings . RELIEF_WEB_APP_NAME } "
1415RELIEFWEB_DATETIME_FORMAT = "%Y-%m-%d"
1516
1617
Original file line number Diff line number Diff line change @@ -867,6 +867,9 @@ def decode_base64(env_key, fallback_env_key):
867867 if GO_ENVIRONMENT == "development" :
868868 OAUTH2_PROVIDER ["ALLOWED_REDIRECT_URI_SCHEMES" ].append ("http" )
869869
870+ # ReliefWeb (for databank cronjob)
871+ RELIEF_WEB_APP_NAME = env ("RELIEF_WEB_APP_NAME" )
872+
870873# Manual checks
871874import main .checks # noqa: F401 E402
872875
You can’t perform that action at this time.
0 commit comments