wagtail/docs
Andy Chosak f84cea6715
Don't update the reference index while deleting it
The rebuild_reference_index management command starts by
deleting the entire ReferenceIndex table.

In Wagtail versions 4.1 and 4.2, all models are tracked in the
reference index. Unfortunately this also includes the
ReferenceIndex model itself. This is changed in 5.0 to only track certain Wagtail-related models [0].

This means that when rebuild_reference_index runs in versions
4.1 or 4.2, and deletes the ReferenceIndex table, it runs the code that checks whether ReferenceIndex instances have any
references.

If the index contains a large number of references (as could
happen if an upgrade to 4.1 built an index for a non-Wagtail
model), this process becomes extremely slow. There's no need
for the rebuild_reference_index command to update the index
when deleting it, so this can be significantly optimized by
disabling auto update here.

[0] https://docs.wagtail.org/en/stable/releases/5.0.html#referenceindex-no-longer-tracks-models-used-outside-of-wagtail
2023-07-31 15:38:09 +01:00
..
_static Update styles for block picker in dark mode () 2023-07-14 14:42:12 +01:00
_templates
advanced_topics Fix code block typo in streamfield_migrations.md () 2023-07-20 07:48:43 +10:00
contributing Update docs to cover Elasticsearch 8 support 2023-07-17 16:18:37 +01:00
editor_manual
extending Implement new Draftail customisation APIs 2023-07-06 13:14:54 +10:00
getting_started Clean whitespace formatting in docs 2023-07-17 22:24:54 +10:00
public
reference Add docs for migrating from modeladmin to snippets 2023-07-27 09:26:44 +01:00
releases Don't update the reference index while deleting it 2023-07-31 15:38:09 +01:00
topics Add docs for migrating from modeladmin to snippets 2023-07-27 09:26:44 +01:00
Makefile
README.md
autobuild.sh
conf.py Run pyupgrade with `--py38-plus` 2023-07-14 13:06:41 +01:00
favicon.ico
index.rst
logo.png
spelling_wordlist.txt
support.md

README.md

Wagtail docs

These are Sphinx docs, automatically built at https://docs.wagtail.org when the main branch is committed to GitHub. To build them locally, install Wagtail's development requirements (in the root Wagtail directory):

pip install -e .[testing,docs]

To build the documentation for browsing, from this directory run:

make html

then open _build/html/index.html in a browser.

To rebuild automatically while editing the documentation, from this directory run:

sphinx-autobuild . _build

The online MyST playground at Curvenote or the MyST-Markdown VS Code Extension are helpful tools for working with the MyST syntax.