You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airavata.apache.org by "yasithdev (via GitHub)" <gi...@apache.org> on 2026/06/08 05:33:03 UTC
[PR] feat(cms): port Airavata page models, snippets, and blocks to Wagtail 7.4 [airavata-portals]
yasithdev opened a new pull request, #114:
URL: https://github.com/apache/airavata-portals/pull/114
## A2.2 — port the portal's Wagtail content schema into the standalone CMS
Second step of standing up `airavata-cms` (the standalone Wagtail service that will own gateway landing pages and docsites, decoupled from the portal). After the scaffold (#113), this PR brings over the portal's Wagtail **content schema**, modernized from Wagtail 2.13 → **7.4 / Django 6.0 / Python 3.13**.
### What's ported (into the `home` app)
- **`home/blocks.py`** — the StreamField block library: paragraph, image, embed, heading, Bootstrap components (jumbotron/alert/button/card/carousel/well/media/embed-video), nav items, CSS, horizontal rule, FontAwesome, code. Import modernized `wagtail.core.blocks` → `wagtail.blocks`; `CodeBlock` via `wagtailcodeblock` 1.30 (declares Wagtail 7 support).
- **`home/models.py`** — 9 snippets (`Announcements`, `Navbar`, `GatewayIcon`, `GatewayTitle`, `FooterText`, `NavExtra`, `CustomCss`, `CustomHeaderLinks`, `ExtraWebResources` + `CssLink`/`JsLink`) and 3 page types (`HomePage`, `BlankPage`, `CybergatewayHomePage`) with their orderable rows.
### Modernization changes
- `wagtail.admin.edit_handlers` → `wagtail.admin.panels`; the removed `StreamFieldPanel` / `ImageChooserPanel` / `PageChooserPanel` → `FieldPanel`.
- `wagtail.core.fields` → `wagtail.fields`; `wagtail.core.models` → `wagtail.models`.
- `ParentalKey` app label `django_airavata_wagtail_base` → `home`.
- Regenerated `home/0001_initial` for the full schema. Rewrote the create-homepage data migration to run **after** wagtailcore: the rich `HomePage` FKs (to `wagtailimages.Image` / `wagtailcore.Page`) pull `0001_initial` onto a late wagtailcore migration, so the scaffold's `run_before=("wagtailcore","0053_locale_model")` trick would create a dependency cycle. It now sets the page `locale` explicitly instead.
- `wagtailcodeblock` added to `requirements.txt` and `INSTALLED_APPS`.
### Validation (sqlite)
`migrate`, `makemigrations --check --dry-run` (no changes), and `manage.py check` all green; the data migration creates the root `Home` page + default site. Registry confirms 9 snippets, 3 page types, and a 19-block `BaseStreamBlock`.
### Scope / follow-ups
Schema only. Page + block **render templates** and the **seagrid theme/content import** (the old Wagtail 2.13 fixtures reference removed models like `wagtailcore.pagerevision` and old StreamField JSON, so they can't be `loaddata`'d as-is) come in subsequent PRs. The Wagtail **admin** is fully functional now; live page rendering lands with the templates.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@airavata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(cms): port Airavata page models, snippets, and blocks to Wagtail 7.4 [airavata-portals]
Posted by "yasithdev (via GitHub)" <gi...@apache.org>.
yasithdev merged PR #114:
URL: https://github.com/apache/airavata-portals/pull/114
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@airavata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org