diff --git a/ncov19_dash/config.py b/ncov19_dash/config.py index 6c54ba5..e95cd09 100644 --- a/ncov19_dash/config.py +++ b/ncov19_dash/config.py @@ -12,6 +12,7 @@ class DataReadingError(Exception): """DataReadingError exception used for sanity checking. """ + def __init__(self, *args): super(DataReadingError, self).__init__(*args) if args: @@ -58,6 +59,9 @@ class StagingConfig: # Drive Thru Facilities DRIVE_THRU_URL = config("DRIVE_THRU_STAGING_URL") + # SMS App URL + SMS_APP_URL = config("SMS_APP_URL") + class ProductionConfig(StagingConfig): """Uses production database server.""" @@ -87,5 +91,6 @@ def get_config(): return ProductionConfig + config = get_config() # print(f"[DEBUG] Config being used is: {config.__class__.__name__}") diff --git a/ncov19_dash/layout/desktop_nav.py b/ncov19_dash/layout/desktop_nav.py index aacfd96..0f69757 100644 --- a/ncov19_dash/layout/desktop_nav.py +++ b/ncov19_dash/layout/desktop_nav.py @@ -1,6 +1,6 @@ import dash_bootstrap_components as dbc import dash_html_components as html - +from ncov19_dash import config dropdown_bar = dbc.Row( dbc.DropdownMenu(label="Location", children=[dbc.DropdownMenuItem("US"),]), @@ -29,7 +29,7 @@ html.A( "Get Mobile Updates", className="navbar-brand-links", - href="https://ncov19-sms-bot-fe-staging.herokuapp.com/", + href=config.SMS_APP_URL, id="get-mobile-updates", ), # html.A( diff --git a/ncov19_dash/layout/mobile_nav.py b/ncov19_dash/layout/mobile_nav.py index 4125083..7de27fc 100644 --- a/ncov19_dash/layout/mobile_nav.py +++ b/ncov19_dash/layout/mobile_nav.py @@ -1,6 +1,6 @@ import dash_bootstrap_components as dbc import dash_html_components as html - +from ncov19_dash import config mobile_navbar = [ # User row and col to control vertical alignment of logo/brand @@ -32,7 +32,7 @@ html.A( html.P("Get Mobile Updates", className="mobile-nav-header"), className="mobile-hidden-menu-anchor-tag", - href="https://ncov19-sms-bot-fe-staging.herokuapp.com/", + href=config.SMS_APP_URL, ), html.A( html.P("About", className="mobile-nav-header",),