Skip to content
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

Update homepage to not used wagtail pages #4127

Merged
merged 1 commit into from
Oct 17, 2024
Merged

Update homepage to not used wagtail pages #4127

merged 1 commit into from
Oct 17, 2024

Conversation

theskumar
Copy link
Member

@theskumar theskumar commented Sep 10, 2024

Use standard django views to show hompeage instead of piggy backing on
the wagtail. This allows to remove the "Pages" menu from the wagtail
admin and have the homepage settings be at a single "System Settings"

  • update the hompeage to use Settings > System Settings
  • add data migration to move the properties from ApplyHompeage model to
    SystemSettings
  • hide "Pages" menu from wagtail
  • Refractor the homepage template

Fixes: #4116

@theskumar theskumar self-assigned this Sep 10, 2024


class ApplyHomePage(Page):
# Only allow creating HomePages at the root level
parent_page_types = ["wagtailcore.Page"]
subpage_types = ["funds.FundType", "funds.LabType", "funds.RequestForPartners"]

strapline = models.CharField(blank=True, max_length=255)
Copy link
Contributor

@frjo frjo Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this line makes the code in copy_homepage_title_and_strapline not run since the model no longer have a strapline.

Would be really good to get this working making the deployment of this release seamless.

Maybe we can remove the strapline field in a separate release?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, hasattr will always be false. I think we can remove it later after couple of releases.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the code so that it keeps the strapline on the ApplyHome model.

@frjo frjo added Status: Needs testing Tickets that need testing/qa Type: Feature This is something new (not an enhancement of an existing thing). Type: Minor Minor change, used in release drafter Status: Needs dev testing 🧑‍💻 Tasks that should be tested by the dev team labels Oct 2, 2024
@wes-otf wes-otf added Status: Tested - approved for live ✅ and removed Status: Needs testing Tickets that need testing/qa Status: Needs dev testing 🧑‍💻 Tasks that should be tested by the dev team labels Oct 17, 2024
@frjo frjo merged commit f46b0bc into main Oct 17, 2024
10 checks passed
sandeepsajan0 pushed a commit that referenced this pull request Oct 18, 2024
Use standard django views to show hompeage instead of piggy backing on
the wagtail. This allows to remove the "Pages" menu from the wagtail
admin and have the homepage settings be at a single "System Settings"

- update the hompeage to use Settings > System Settings
- add data migration to move the properties from ApplyHompeage model to
  SystemSettings
- hide "Pages" menu from wagtail
- Refractor the homepage template

Fixes: #4116
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Tested - approved for live ✅ Type: Feature This is something new (not an enhancement of an existing thing). Type: Minor Minor change, used in release drafter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rebuild homepage to not be a wagtail page
3 participants