0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-24 10:58:52 +01:00
wagtail/docs
Matt Westcott 5212061485
Normalize StreamField.get_default to prevent creation forms from breaking
Fixes #12561

When a ModelForm is constructed without passing an `initial` instance, the result of `StreamField.get_default()` will become the default value of the form field without the intermediate step of being set on a model instance and read back (which would have the side effect of calling `normalize()`). Form rendering only works with normalized values (e.g. StreamValue rather than list-of-tuples for a StreamBlock), so the return value from `get_default()` needs to be normalized.
2024-11-13 15:46:07 +00:00
..
_static
_templates
advanced_topics Use intersphinx to link to treebeard docs 2024-11-05 10:44:41 +00:00
contributing Minor tweaks per code review 2024-11-12 10:58:04 +00:00
deployment Replace hardcoded Django docs links to intersphinx links 2024-11-05 10:44:39 +00:00
editor_manual
extending Add note about extending section not subject to deprecation policy 2024-11-08 20:09:39 +00:00
getting_started Update outdated Pillow links 2024-11-05 10:44:41 +00:00
public
reference Fix - Ensure WagtailAdminFormPageForm.clean returns cleaned_data 2024-11-05 19:22:33 +00:00
releases Normalize StreamField.get_default to prevent creation forms from breaking 2024-11-13 15:46:07 +00:00
topics Replace hardcoded Django docs links to intersphinx links 2024-11-05 10:44:39 +00:00
tutorial
conf.py Use intersphinx to link to treebeard docs 2024-11-05 10:44:41 +00:00
favicon.ico
index.rst
logo.png
Makefile
README.md
spelling_wordlist.txt
support.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.