Skip to content

Commit

Permalink
Merge pull request #8717 from cfpb/es/homepage-cleanup
Browse files Browse the repository at this point in the history
Remove legacy Spanish homepage
  • Loading branch information
niqjohnson authored Jan 14, 2025
2 parents e2f151a + 92ae773 commit c5ee163
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 255 deletions.
6 changes: 0 additions & 6 deletions cfgov/cfgov/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,12 +644,6 @@
("environment is", "local"),
("environment is", "test"),
],
# Spanish homepage
"SPANISH_HOMEPAGE": [
("environment is", "dev5"),
("environment is", "local"),
("environment is", "test"),
],
}

REGULATIONS_REFERENCE_MAPPING = [
Expand Down
155 changes: 0 additions & 155 deletions cfgov/v1/jinja2/v1/home_page/_hardcoded_legacy_es.html

This file was deleted.

46 changes: 0 additions & 46 deletions cfgov/v1/jinja2/v1/home_page/home_page_legacy.html

This file was deleted.

19 changes: 1 addition & 18 deletions cfgov/v1/models/home_page.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from wagtail.admin.panels import ObjectList, TabbedInterface
from wagtail.models import Page

from flags.state import flag_enabled

from v1.models.base import CFGOVPage


Expand All @@ -16,19 +14,4 @@ class HomePage(CFGOVPage):
]
)

def get_template(self, request, *args, **kwargs):
try:
if flag_enabled("SPANISH_HOMEPAGE"):
return {
"en": "v1/home_page/home_page.html",
"es": "v1/home_page/home_page.html",
}[self.language]
else:
return {
"en": "v1/home_page/home_page.html",
"es": "v1/home_page/home_page_legacy.html",
}[self.language]
except KeyError as e:
raise NotImplementedError(
f"Unsupported HomePage language: {self.language}"
) from e
template = "v1/home_page/home_page.html"
30 changes: 0 additions & 30 deletions cfgov/v1/tests/models/test_home_page.py

This file was deleted.

0 comments on commit c5ee163

Please sign in to comment.