-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove legacy Spanish homepage #8717
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🆒
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome -- one non-blocking suggestion.
cfgov/v1/models/home_page.py
Outdated
return { | ||
"en": "v1/home_page/home_page.html", | ||
"es": "v1/home_page/home_page.html", | ||
}[self.language] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For simplicity, we could remove this entire method in favor of a
template = "v1/home_page/home_page.html"
If someone were to create a HomePage with another language, they'd still get a (slightly less helpful) error message when this import statement failed.
If we did that we could remove these unit tests entirely as well.
@chosak, good call, I simplified template selection and ditched the unit tests in 92ae773. I initially liked being explicit about which languages we had a homepage in, but thinking about it more, if the end goal is to move the content into Wagtail, it makes more sense to simplify things as much as possible now. I've re-requested reviews. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks to @chosak for the simplification
Now that the updated Spanish homepage is launched, we can clean up the feature flag we were using for development and get rid of the legacy homepage code.
Removals
SPANISH_HOMEPAGE
feature flagHow to test this PR
/
and/es/
both render as they do in productionNotes and todos
get_template
, but I kind of like being explicit that only English and Spanish have a homepage, so I left them on separate lines—happy to revise if there's a better way, though.Checklist