mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
3797132b4d
Currently a select set of StreamField blocks like PageChooserBlock expose a bulk_to_python method that is used to optimize their retrieval from the database. As reported in issue 5926, ListBlock could take advantage of this so that its child items are loaded at once, instead of one at a time. This change modifies how ListBlock.to_python works so that it calls its child block's bulk_to_python, if defined. This allows for a single query instead of one query per child item. Note that this change doesn't add bulk_to_python to ListBlock itself, meaning that individual ListBlocks in a StreamField or StructBlock are still retrieved independently. But it does optimize the lookup for each ListBlock. |
||
---|---|---|
.. | ||
_static | ||
advanced_topics | ||
contributing | ||
editor_manual | ||
getting_started | ||
reference | ||
releases | ||
topics | ||
autobuild.sh | ||
conf.py | ||
favicon.ico | ||
index.rst | ||
logo.png | ||
Makefile | ||
README.md | ||
requirements.txt | ||
spelling_wordlist.txt | ||
support.rst |
Wagtail docs
These are Sphinx docs, automatically built at https://docs.wagtail.io when the master 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 editor at http://rst.ninjs.org/ is a helpful tool for checking reStructuredText syntax.