Add user_display_name template filter to simplify user display code
This replaces the `{{ some_rambling_expression_evaluating_to_a_user.get_full_name|default:some_rambling_expression_evaluating_to_a_user.get_username }}` pattern used all over the place.
Display user's full name (where available) in LogEntry listings
Don't use full name if it consists of whitespace (which happens on our test user models)
release note
Fixes #5807. If the page instance being previewed gets saved (no confirmation that Wagtail itself is doing this, but it could easily happen as a result of some misplaced logic in `get_context` or similar), it will block further page creations in a way that's difficult to recover from.
* Use Django modelcluster's copy_all_child_relations method
* page.specific.__class__ => page.specific_class
* Use child_object_map as returned by modelcluster for revision rewriting
* Use modelcluster to commit child relations
* Use a callback instead of a method for _save_copy_instance
* Make CopyMixin work on non-MTI models
* Make gathering exclude_fields the job of the callee
._copy() no longer depends on any custom attributes in the base class!
* Converted CopyMixin into some utility methods (and renamed some stuff)
* Don't commit the new page in _copy
* Refactor _copy_m2m_relations to be more standalone
* Merge _make_copy into _copy
Not really useful outside _copy
* Give unused variable a name
* Version-bump django-modelcluster to 5.1
* Address review feedback
Co-authored-by: Matt Westcott <matt@west.co.tt>
Make use of the same `edit_handler` and `form` objects during the whole
creation and edit views process. `edit_handler` is initialized and
bounded to the instance during `setup()` which fixes #5005. This also
ensures that the form is cleaned only once.
The current text still mentions the rich-text class (which is now formally deprecated) alongside responsive-object (which is not deprecated, but off by default). Split up the CSS snippet to make it clear that these are two distinct cases, and eliminate use of rich-text.