* Improve Dockerfile in project template
This reorganises Dockerfile to make it adhere to more common-sense rules,
while not being too opinionated on the deployment process.
* Add dockerignore file
* Make Dockerfile comments nicer
* Delete dockerignore created in a wrong path
* Add the right dockerignore files
* Use slim buster Docker image
* Add sqlite3 files to dockerignore
* Fix Docker image name
Ref: https://github.com/wagtail/wagtail/issues/5670#issuecomment-615836390
Add an `is_previewable` method to Page (which accounts for being called either on the base Page model or the specific subclass, as either may be in use on listing pages that display these buttons), and check this when rendering buttons.
Additionally, fix the 'pages for moderation' panel to check that revision.user is defined before trying to output a username - this field is intentionally nullable to allow for scripted processes. Without this check, under normal template-rendering rules the whole panel is liable to be silently dropped.
Ref #5528; fixes #5352. As of Chrome 81, autocomplete="off" seems to be a better bet for preventing unwanted autocompletion dropdowns, rather than autocomplete="some-unrecognised-string".
- Fixes #5358
- Make classes on the nav submenu adhere to BEM a little better
- Make nav submenu footer match the styles of the things around it a little better (other submenu items on mobile, and the other menu footer on larger screens)
If validation rules prevent the multiple image upload view from
creating Image objects from just the image file, an UploadedImage object is
created instead, and turned into an image once the form is filled in.
* Fixes #847
* Add UploadedImage model and related views
* Update custom image model docs
According to the ARIA spec:
> A region that contains mostly site-oriented content, rather than page-specific content.
> Site-oriented content typically includes things such as the logo or identity of the site sponsor, and a site-specific search tool. A banner usually appears at the top of the page and typically spans the full width.
Where the `banner` role was applied was more page-specific than
site-specific. In addition, tags with `banner` roles should not live
under another landmark. To rectify, removed the misused banner roles.
Remove inappropriate contentinfo landmarks
According to ARIA spec 1.1
> A large perceivable region that contains information about the parent document.
> Examples of information included in this region of the page are copyrights and links to privacy statements.
They don't apply to the action buttons on where this was applied to.
Add main landmark to 404 page
- fixes #5099
- test_copy_page_with_excluded_parental_and_child_relations
- ensure the tests are wrapped in a try/finally so that the model is always reset back even if tests fail
- update page model tests
Fixes wagtail/wagtail#5937
This reverts Wagtail's behaviour to match Django's, where an error is
raised as a safety mechanism.
Projects relying on the non-safe behaviour should update e.g.
`MyModel.objects.delete()` to `MyModel.objects.all().delete()`.
An individual StreamField block in the comparison view may be rendered as a plain value (for blocks that are unchanged, added or deleted) or a diff (for blocks that are changed). In both cases, the output is returned as HTML, but must not contain any unescaped editor-supplied HTML.
For CharBlock, TextBlock and RawHTMLBlock, the block value is escaped so that any HTML tags in the content are shown verbatim.
For RichTextBlock and any other block types that do not override the default comparison behaviour, we take the basic (non-templated) HTML rendering of the block and extract text-only content from it. This is then returned in HTML-escaped form for the plain view, and run through diff_text().to_html() for the diff view (which handles escaping itself).