Skip to content

Commit f0b142f

Browse files
committed
docs(wagtail): remove Initial Data Setup section
1 parent 6818de2 commit f0b142f

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

docs/design/wagtail-support.rst

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -74,22 +74,6 @@ A ``viewsets.populate()`` idempotency guard is also included: both the local cop
7474

7575
**Maintenance note:** this file must be re-diffed against the upstream ``wagtail/admin/urls/__init__.py`` on each Wagtail upgrade.
7676

77-
Initial Data Setup
78-
------------------
79-
80-
**Decision: create root page and default site in code, not via migrations**
81-
82-
Because all Wagtail migrations are empty, Wagtail's ``0001_initial`` data migration (which normally creates the root ``Page`` and default ``Site``) never runs. ``_setup_wagtail_initial_data()`` in ``project.py`` fills this gap by running a small inline Python script via the project's venv after ``migrate`` completes:
83-
84-
.. code-block:: python
85-
86-
# Simplified
87-
if not Page.objects.filter(depth=1).exists():
88-
root = Page.add_root(title="Root", slug="root", ...)
89-
home = root.add_child(instance=Page(title="Home", slug="home", ...))
90-
Site.objects.create(hostname="localhost", root_page=home, is_default_site=True)
91-
92-
This is called automatically by ``dbx project run`` before the development server starts, so the Wagtail admin is immediately usable.
9377

9478
Flag-Based Enablement
9579
---------------------

0 commit comments

Comments
 (0)