Skip to content

feat: add optional Wagtail CMS integration#15

Merged
h0pers merged 2 commits into
masterfrom
feat/wagtail-integration
Jun 30, 2026
Merged

feat: add optional Wagtail CMS integration#15
h0pers merged 2 commits into
masterfrom
feat/wagtail-integration

Conversation

@h0pers

@h0pers h0pers commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add use_wagtail cookiecutter option (default: n) to optionally integrate Wagtail CMS into generated projects
  • Create cms app with HomePage model (Page + RichTextField) and app-level templates (base.html, home_page.html)
  • Add wagtail.py settings component with WAGTAIL_SITE_NAME, WAGTAILADMIN_BASE_URL, WAGTAILDOCS_EXTENSIONS, and DATA_UPLOAD_MAX_NUMBER_FIELDS
  • Wire up URL routing: /cms/ (Wagtail admin), /documents/ (document serving), / (catch-all page serving)
  • Add all 13 required Wagtail apps to INSTALLED_APPS and RedirectMiddleware to MIDDLEWARE
  • Extend post-gen hook to remove Wagtail files when use_wagtail=n
  • Expand CI matrix to cover all use_drf x use_wagtail combinations (4 jobs)

Test plan

  • Generate project with use_wagtail=y use_drf=y — verify all wagtail files present, settings correct, app starts
  • Generate project with use_wagtail=y use_drf=n — verify wagtail works without DRF config
  • Generate project with use_wagtail=n — verify no cms app, no wagtail settings, no wagtail URLs
  • Run docker compose -f docker-compose.debug.yml up --build and confirm /cms/ admin loads
  • Run pre-commit on generated project — verify no lint errors
  • CI matrix passes all 4 combinations

h0pers added 2 commits June 30, 2026 17:24
Add use_wagtail cookiecutter option that integrates Wagtail CMS with
a cms app (HomePage model), wagtail settings component, URL routing
(/cms/ admin, /documents/, catch-all pages), and CI matrix coverage.
@h0pers
h0pers merged commit 8969cb0 into master Jun 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant