Need to flip order of creating `BlogIndexRelatedLink` and `BlogIndexPage`, otherwise `BlogIndexRelatedLink` references `BlogIndexPage` before it's been created and you get:
```bash
ERRORS:
blog.BlogIndexRelatedLink.page: (fields.E300) Field defines a relation with model 'BlogIndexPage', which is either not installed, or is abstract.
```
Multiply inherited StructBlocks and StreamBlocks now correctly order
their sub-blocks, in reverse MRO order. `declared_blocks` was being
overridden with `base_blocks`, which was screwing with the order.
Additionally, the order of fields when inheriting from multiple parents
is not obvious at first, so a comment has been added to the test
explaining the expected behaviour.
Only known fields are passed in to the template, instead of allowing any
arbitary data. Additionally, fields in value now appear in the same
order that they are declared in
This fixes a `unittest.expectedFailure`, by rearranging the tests to
test the correct things.
FieldBlocks should not return anything from `get_searchable_content`. It
is up to subclasses to override it and return something relevant.
`ChoiceBlock` overrides it to return the display value of the chosen
item.
This exposes an inconsistency between the old `PageManager.(not_)sibling_of` method (which was
exclusive by default) and `PageQuerySet.(not_)sibling_of)` (which is inclusive). We therefore
standardise on the inclusive behaviour (in line with treebeard's own sibling methods), and note
this change of behaviour in the release notes.
When text is pasted into a rich text block from MS word, HTML comments are created that contain lots of data that we don't need.
This commit changes the whitelister to remove any comment nodes it comes across.
Splits ElasticSearchQuery.to_es into three methods:
- get_inner_query - Returns an unfiltered match or multi_match query
- get_filters - Returns the filters to apply to the query
- get_query - Returns the "inner query" with the filters applied (what to_es used to return)