django-taggit 1.x drops Python 2.x support and thus the dependency on django.utils.six; this is a prerequisite for supporting Django 3.0.
The signature of TaggableManager.value_from_object has changed to return a list of Tags (previously it was a QuerySet of TaggedItems) and so search indexing and comparison need to be updated accordingly. There is a corresponding fix to ClusterTaggableManager in django-modelcluster 5.0.
Fix doc and test on ES6 python client compat
This commit changes the statement that version < 6.3.1 of the
elasticsearch python client should be used to instead state
that 6.4.0 is fine.
It also update the tests to reflect the statement.
Initially the `update_all_types` argument has been used to work
around an issue described in:
https://github.com/wagtail/wagtail/issues/2968
This argument was removed in elasticsearch-py 6.3.1 and making
use of it was raising an error.
With 6.4.0 nothing is raising anymore.
* Add tests for custom image on multiple image uploader
* Output form media on image add/edit views
* Output form media for 'add image' form within image chooser modal
Note: this won't work reliably if the media is hosted on a CDN, because script tags inserted as part of a jQuery DOM insertion (as modals are) are loaded asynchronously and not guaranteed to complete loading before inline scripts are run. It's better than not having the includes there at all though...
* Create caption field added to table block widget
Caption allows for users users with screen readers to be
able to understand the contents of a table.
* Fixed bugs in javascript and typos
* Updated documentation and change log
* Fixed table caption bug and requested pr edits
* Fixed table caption bug and request pr edits
* Removed changes in changelog.txt
* Fixed bug and requested PR edits
Currently any user with any page permission can view any page revision.
This commit fixes that, and ensures that the user has publish or edit
permission on the page before showing a page revision. If not, the user
is presented with a 403.
This maintains the current behavior if the user has no page permissions,
which is to redirect to the admin home page.
New tests have been added to cover these changes.
Fixes issue 5426.
When editing a rich text field and entering a link to a page whose Page
type overrides get_admin_display_title, the custom admin display title
is used both when browsing to select the page to link to and also when
viewing the rich text editor.
The first behavior is consistent with how custom admin display titles
are used throughout the admin, but the second behavior is not. The
Wagtail user should be able to use the rich text field as a reasonable
preview of what the rendered content will look like for the end user. To
do this, the "real" page title should be used, not the admin one.
This commit alters the data that gets passed to the rich text editor so
that its title is the real page title and not the admin one.
Fixes issue 5131.
Modeladmin handles notification to the user if a model instance has protected ForeignKey
relationships. However, if the protected relation is a OneToOneField it raises an exception:
File ".../wagtail/wagtail/contrib/modeladmin/views.py", line 742, in post
for obj in qs.all():
AttributeError: 'MyRelatedModel' object has no attribute 'all'
because qs in this case is the related instance rather than a queryset of related instances
(as is the case for a ForeignKey).
This commit handles the OneToOneField case as well.
This is mainly copy paste of Liam Brenner work (#3776) but with
a few fixes to make it work with Draftail. Since mailto:-links
is supported i think it is reasonable to support tel:-links as
well
User interaction with the form within the 10s delay also won’t trigger the confirmation message. There will still be race condition issues if form widgets like rich text take 10+ seconds to initialise – but that doesn’t seem likely.
This hook mimics the functiolity provided by `construct_page_action_menu`
in that it constructs the final list of buttons to be shown in the wagtail
admin interface. This means that within this function button's can be
removed, added or re-ordered.
See #4925
Testing the queryset in the if clause was causing the whole queryset
to be retrieved and populated from DB, all to check whether it was empty
or not.
The optimization is to rely on the strict behavior of
first_common_ancestor, which raises an exception if the queryset is
empty.
The USERNAME_FIELD exists to allow customisation. Therefore we should make an assumption that `.username` exists on the model. Instead, we need to pull the required value from the USERNAME_FIELD and add in a fallback default.
* Ensure that when you open the explorer the focus moves to the first link of the menu, and add a label for the explorer navigation
* Add dialog role to pages explorer popup, and ensure that there is an option to close the dialog window when tabbing by making the close button visually hidden rather than display none
revisions_for_moderation() was iterating over Page instances only
to use their path attribute. The optimization uses values_list()
over the GroupPagePermission queryset to retrieve only the page
paths without having to create the model instances in memory. This
saves roughly 50% of the runtime.
- adds a fieldset around checkboxes with the same name
- add correct labels for object permissions table
- Ensure that image and document permissions labels display correctly, and ensure that labels for the dropdowns for document and image collections are not display:none
- Hide labels from sighted users in group edit / group add pages
* Adds clearer text to the close button for modals
* Use existing wagtailConfig.STRINGS to store the new translatable string for JS, rather than introducing a new library.
* Update list of string constants for translation in the tests file
* Remove aria-hidden on modal dialog close button
- Images in the image listing now have an empty alt tag
- All information about the image, including title and image dimensions are now in the heading below
- The dimensions are visually hidden because they only relevant to screen readers, as sighted users can get and idea of the image dimensions from the thumbnail
Update chooser modal JS to use field IDs with prefixes
Note that the tag field JS no longer needs to be initialised here, as that's done in AdminTagWidget's inline JS
This allows them to work on pages that do not include _editor_js.html (or page-editor.js). However, wagtailadmin/shared/datetimepicker_translations.html will still be required in order to localise the date picker UI.
Move datepicker translations to admin_base.html
ImageRenditionField returns a relative URL - The example in the docs shows an absolute URL with the site's hostname, but the ImageRenditionField returns a relative URL.
Merge pull request #5306 from mihow/patch-2
The string of self.form is the same as form.as_table - which is too verbose.
This updates the __repr__ of EditHandler/FieldPanel to show the class name of the form being used instead (or NoneType if it's None).
- Revise grammar for Learn Wagtail link
- Add articles from Timonweb blog
- Add Youtube link for Google Cloud Platform
- Add blog from Jelastic (PaaS) deployment
- Add Mozilla guide for end users (really well laid out and reasonably generic)
- Fix clear_edit_handler decorator
- Will allow the TestPageEditHandlers test cases to run
- Fixes test for test_check_invalid_base_form_class
- Errors might be returned out of order, so sort them before comparing them to the expected list
This generated block of code needs to stay or else there will be an error while running ./manage.py migrate. It is misleading that it is not included in this tutorial.
- Group venv creation and activation by shell, because Windows uses backslashes
- Note that the env folder should be excluded from version control
- Account for the need to specify the directory for `wagtail start` when the directory already exists
- Move the `cd mysite` line to the project dependency instruction, because that's the first time it's really needs
-
In the interest of better diffs:
Instead of breaking by line length, break by sentence. Break lists by item in the list and put some long urls on their own lines.
- Always clarify that the instructions assume a virtual environment
- Add to the tutorial instructions for using venv
- Clarify that Python 3 is required
- Clarify that the tutorial is an alternative to "Getting started" that
assumes less background knowledge
- Remove pip installation instructions because Django only supports
versions of Python that include it
- Make headings in the tutorial instead of an ordered list
This makes the page easier to scan visually and allows linking to
specific headings.
- Add the warning about Pillow dependencies to the tutorial
- In "Getting started" move Pillow's dependencies to the general
dependencies list
- Make language more welcoming (saying "we just do x" alienates people
who have less familiarity with x")
- Other small text changes
* Fetch new translations from Transifex, update contributors, add new languages with >90% coverage to WAGTAILADMIN_PROVIDED_LANGUAGES
* Update transifex config to download Chinese (Simplified) and Chinese (Traditional) translations as zh_Hans and zh_Hant respectively
* Fix get-translator-credits.py to recognise 'tet' as the locale string for Tetum (which Babel doesn't)
Labels for sortable headings need whitespace around them in order for the arrow to be correctly positioned. In addition, some headings had the label outside of the sort link - this is now fixed too.