From 87ed1c1ba49864c87bf2c64df8de3ff5e30b1e55 Mon Sep 17 00:00:00 2001 From: Laura Beaufort Date: Tue, 18 Feb 2020 13:24:12 -0500 Subject: [PATCH] Add feature flag for presidential map --- fec/data/urls.py | 10 +++++++--- fec/fec/settings/base.py | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/fec/data/urls.py b/fec/data/urls.py index 58b51db0f9..c1dd4a0b83 100644 --- a/fec/data/urls.py +++ b/fec/data/urls.py @@ -2,6 +2,7 @@ from data import views from data import views_datatables +from fec import settings urlpatterns = [ url(r'^data/$', views.landing), @@ -16,9 +17,6 @@ url(r'^data/raising-bythenumbers/$', views.raising), url(r'^data/spending-bythenumbers/$', views.spending), - # Presidential Campaign Finance Map - url(r'^data/candidates/president/presidential-map/$', views.pres_finance_map), - # Feedback Tool url(r'^data/issue/reaction/$', views.reactionFeedback), url(r'^data/issue/$', views.feedback), @@ -49,3 +47,9 @@ url(r'^widgets/aggregate-totals/$', views.aggregate_totals), ] + +if settings.FEATURES.get('presidential_map'): + # Presidential Campaign Finance Map + urlpatterns.append( + url(r'^data/candidates/president/presidential-map/$', views.pres_finance_map) + ) diff --git a/fec/fec/settings/base.py b/fec/fec/settings/base.py index 66afaff2bd..53f5fc7055 100644 --- a/fec/fec/settings/base.py +++ b/fec/fec/settings/base.py @@ -53,6 +53,7 @@ 'use_tag_manager': bool(env.get_credential('FEC_FEATURE_USE_TAG_MANAGER', '')), 'contributionsbystate': bool(env.get_credential('FEC_FEATURE_CONTRIBUTIONS_BY_STATE', '')), 'ierawfilters': bool(env.get_credential('FEC_FEATURE_IE_RAW_FILTERS', '')), + 'presidential_map': bool(env.get_credential('FEC_FEATURE_PRESIDENTIAL_MAP', '')), } ENVIRONMENTS = {