- Add anyascii to replace unidecode
- Update wagtail.core.utils.string_to_ascii to use anyascii.
- Anyascii has a similar but not exactly the same encoding - see updates to tests.
Refs https://github.com/wagtail/wagtail/issues/3311
Fixes #6288
Many of the oembed endpoints currently listed with an http:// URL now redirect to https://. Changing these to https:// saves a redundant redirect and avoids failures where the http URL has been blocked (see #6288). Also simplified the patterns for matching http or https - the group in `http(?:s)?` is redundant and should just be `https?`.
There's currently a number of places where we test hooks by registering
hook functions from test methods. These are never cleaned up so that
hook remains registered in future tests. This can cause issues with
tests not working consistently when you run a subset of the tests.
This adds a `register_temporarily` function to the hooks module. This
function can be used either as a decorator or a context manager. It'll
always remove the hook after the decorated function or with block exits,
even if it exits through an exception.
See #5548 - Transifex recognises % formatting, and will guard against translators introducing errors by attempting to translate the embedded variable names.
* Use plain old Django forms for tasks
* Revert "Add ExcludeFieldsOnEditMixin for edit handlers, disabling specific fields when bound to an existing instance rather than creating a new one"
This reverts commit 62961b74bb.
* Move Workflow edit handler creation into Workflow forms
Only advantage of having it the way it was before is that allows
overriding the edit handler in subclasses. But nobody will be doing this
with workflows.
I've added a note into the code pointing out that we might want to
rethink using edit handlers if:
- It gets easier to style formsets without using InlinePanel
- We want to allow customisation of the form (the use of edit handlers
should be considered an internal implementation detail at the moment)
* Make task name readonly but groups editable
* Update wagtail/admin/templates/wagtailadmin/workflows/task_chooser/includes/create_form.html
Co-authored-by: Dan Braghis <dan@zerolab.org>
* Update wagtail/admin/forms/workflows.py
Co-authored-by: Dan Braghis <dan@zerolab.org>
Co-authored-by: Dan Braghis <dan@zerolab.org>