Skip to content

Commit

Permalink
Remove the HMDA Explorer application (#6004)
Browse files Browse the repository at this point in the history
* Remove the HMDA Explorer application

* Restore the HMDA Historic Data page type

* Add Apache rewrite rules for requests coming from api.consumerfinance.gov
  • Loading branch information
Scott Cranfill committed Sep 25, 2020
1 parent d8e581f commit 0fa6c94
Show file tree
Hide file tree
Showing 14 changed files with 9 additions and 2,284 deletions.
11 changes: 9 additions & 2 deletions cfgov/apache/conf.d/redirects.conf
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ Redirect permanent /transfe-lajan /sending-money/ht
Redirect permanent /transfè-lajan /sending-money/ht

Redirect permanent /blog/prepaid /blog/prepaid-products-new-disclosures-to-help-you-compare-options
Redirect permanent /HMDA /hmda
RedirectMatch (?i)^/HMDA /data-research/hmda/
RedirectMatch permanent (?i)^/yourstories /your-story/?utm_source=print\&utm_medium=flyer\&utm_term=2015\&utm_campaign=TaxInsert
Redirect permanent /regcomments /notice-and-comment
Redirect permanent /debtsurvey.html /debtsurvey/
Expand Down Expand Up @@ -505,7 +505,6 @@ RedirectMatch permanent ^\/jobs\/(?!supervision)(?!technology-innovation-fellows

Redirect permanent /advisory-groups/advisory-groups-meeting-details/ /about-us/advisory-groups/
Redirect permanent /advisory-groups/ /about-us/advisory-groups/
Redirect permanent /hmda/ /data-research/hmda/
Redirect permanent /data-research/mortgage-data-hmda/ /data-research/hmda/

Redirect permanent /complaintdatabase/ /data-research/consumer-complaints/
Expand Down Expand Up @@ -1001,3 +1000,11 @@ RedirectMatch permanent (?i)^/wp-content/uploads/(.*) https://files.consumerfina

# Redirect placeholder page created to appear in secondary nav on coronavirus child pages
Redirect permanent /coronavirus/mortgage-and-housing/ /coronavirus/mortgage-and-housing-assistance/


# Redirecting requests to the old, dead, api.consumerfinance.gov
RewriteCond %{HTTP_HOST} api.consumerfinance.gov
RewriteRule ^(?!.*(csv|html|json|jsonp|xml)$).*$ https://ffiec.cfpb.gov/data-publication [R=302,L,NC]
## Except for requests to specific file endpoints, which we mark as gone
RewriteCond %{HTTP_HOST} api.consumerfinance.gov
RewriteRule ^.+(csv|html|json|jsonp|xml)$ - [G,NC]
15 changes: 0 additions & 15 deletions cfgov/cfgov/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,21 +696,6 @@
# SPLIT TESTING FLAGS
# Ask CFPB page titles as H1s instead of H2s
"ASK_CFPB_H1": [("in split testing cluster", "ASK_CFPB_H1")],
# Publish new HMDA Explore page
# Delete after HMDA API is deprecated (hopefully Summer 2019)
"HMDA_LEGACY_PUBLISH": [],
# The HMDA API and HMDA explorer pages will temporarily be taken down at
# TBD intervals. We use a GET parameter during downtime to trigger an
# explanatory banner about the outages.
# Delete after HMDA API is deprecated (hopefully Summer 2019)
"HMDA_OUTAGE": [
{"condition": "parameter", "value": "hmda-outage", "required": True},
{
"condition": "path matches",
"value": r"^/data-research",
"required": True,
},
],
# Manually enabled when Beta is being used for an external test.
# Controls the /beta_external_testing endpoint, which Jenkins jobs
# query to determine whether to refresh Beta database.
Expand Down
12 changes: 0 additions & 12 deletions cfgov/cfgov/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,18 +521,6 @@ def empty_200_response(request, *args, **kwargs):
'BETA_EXTERNAL_TESTING',
r'^beta_external_testing/',
empty_200_response),

# Temporary: HMDA Legacy pages
# Will be deleted when HMDA API is retired (hopefully Summer 2019)
re_path(
r'data-research/hmda/explore$',
FlaggedTemplateView.as_view(
flag_name='HMDA_LEGACY_PUBLISH',
template_name='hmda/orange-explorer.html'
),
name='legacy_explorer_published'
),

]

# Ask CFPB category and subcategory redirects
Expand Down
25 changes: 0 additions & 25 deletions cfgov/hmda/jinja2/hmda-outage-banner.html

This file was deleted.

2,045 changes: 0 additions & 2,045 deletions cfgov/hmda/templates/hmda/orange-explorer.html

This file was deleted.

Empty file.
12 changes: 0 additions & 12 deletions cfgov/hmda/templatetags/hmda_banners.py

This file was deleted.

20 changes: 0 additions & 20 deletions cfgov/hmda/tests/test_legacy_pages.py

This file was deleted.

40 changes: 0 additions & 40 deletions cfgov/hmda/tests/test_outage_banner.py

This file was deleted.

4 changes: 0 additions & 4 deletions cfgov/jinja2/v1/_includes/organisms/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@
{{ complaint_maintenance_banner(request) }}
{% endif %}

{% if flag_enabled('HMDA_OUTAGE') %}
{{ hmda_outage_banner(request) }}
{% endif %}

{% if flag_enabled('OMWI_SALESFORCE_OUTAGE') %}
{{ omwi_salesforce_outage_banner(request) }}
{% endif %}
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions cfgov/v1/jinja2tags/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from jinja2 import Markup, contextfunction
from jinja2.ext import Extension

from hmda.templatetags.hmda_banners import hmda_outage_banner
from v1.jinja2tags.datetimes import DatetimesExtension
from v1.jinja2tags.fragment_cache import FragmentCacheExtension
from v1.models.images import CFGOVRendition
Expand Down Expand Up @@ -103,7 +102,6 @@ def __init__(self, environment):
'omwi_salesforce_outage_banner': omwi_salesforce_outage_banner,
'get_model': get_model,
'get_unique_id': get_unique_id,
'hmda_outage_banner': hmda_outage_banner,
'image_alt_value': image_alt_value,
'is_blog': ref.is_blog,
'is_event': ref.is_event,
Expand Down
8 changes: 0 additions & 8 deletions docs/hmda.md

This file was deleted.

1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ nav:
- Ask CFPB: ask-cfpb.md
- Consumer Complaints: consumer-complaint-database.md
- Find a Housing Counselor Tool: housing-counselor-tool.md
- HMDA Data: hmda.md
- Website Feedback: website-feedback.md

theme:
Expand Down

0 comments on commit 0fa6c94

Please sign in to comment.