mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-30 11:10:43 +01:00
77 lines
3.1 KiB
ReStructuredText
77 lines
3.1 KiB
ReStructuredText
==========================================
|
|
Wagtail 1.2 release notes - IN DEVELOPMENT
|
|
==========================================
|
|
|
|
.. contents::
|
|
:local:
|
|
:depth: 1
|
|
|
|
|
|
What's new
|
|
==========
|
|
|
|
Jinja2 support
|
|
~~~~~~~~~~~~~~
|
|
|
|
The core templatetags (``pageurl``, ``slugurl``, ``image``, ``richtext`` and ``wagtailuserbar``) are now compatible with Jinja2 so it's now possible to use Jinja2 as the template engine for your Wagtail site.
|
|
|
|
See: :doc:`/advanced_topics/jinja2`
|
|
|
|
|
|
Search API improvements
|
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
Wagtail's image and document models now provide a ``search`` method on their QuerySets, making it easy to perform searches on filtered data sets. In addition, search methods now accept an ``operator`` keyword argument, to determine whether multiple search terms will be treated as 'or' (any term may match) or 'and' (all terms must match).
|
|
|
|
See: :ref:`wagtailsearch_searching`
|
|
|
|
|
|
``max_num`` and ``min_num`` parameters on inline panels
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
Inline panels now accept the optional parameters ``max_num`` and ``min_num``, to specify the maximum / minimum number of child items that must exist in order for the page to be valid.
|
|
|
|
See: :ref:`inline_panels`
|
|
|
|
|
|
Minor features
|
|
~~~~~~~~~~~~~~
|
|
|
|
* WagtailRedirectMiddleware can now ignore the query string if there is no redirect that exactly matches it
|
|
* Order of URL parameters now ignored by redirect middleware
|
|
* Added SQL Server compatibility to image migration
|
|
* Added classnames to Wagtail rich text editor buttons to aid custom styling
|
|
* Simplified body_class in default homepage template
|
|
* page_published signal now called with the revision object that was published
|
|
* Added a favicon to the admin interface, customisable by overriding the ``branding_favicon`` block (see :ref:`custom_branding`).
|
|
* Added spinner animations to long-running form submissions
|
|
* The EMBEDLY_KEY setting has been renamed to WAGTAILEMBEDS_EMBEDLY_KEY
|
|
* StreamField blocks are now added automatically, without showing the block types menu, if only one block type exists (Alex Gleason)
|
|
|
|
Bug fixes
|
|
~~~~~~~~~
|
|
|
|
* Deleting a page permission from the groups admin UI does not immediately submit the form
|
|
* Wagtail userbar is shown on pages that do not pass a ``page`` variable to the template (e.g. because they override the ``serve`` method)
|
|
* ``request.site`` now set correctly on page preview when the page is not in the default site
|
|
* Project template no longer raises a deprecation warning (Maximilian Stauss)
|
|
|
|
|
|
Upgrade considerations
|
|
======================
|
|
|
|
``Image.search`` and ``Document.search`` methods are deprecated
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
The ``Image.search`` and ``Document.search`` methods have been deprecated in favour of the new QuerySet-based search mechanism - see :ref:`wagtailsearch_images_documents_custom_models`. Code using the old ``search`` methods should be updated to search on QuerySets instead; for example:
|
|
|
|
.. code-block:: python
|
|
|
|
Image.search("Hello", filters={'uploaded_by_user': user})
|
|
|
|
can be rewritten as:
|
|
|
|
.. code-block:: python
|
|
|
|
Image.objects.filter(uploaded_by_user=user).search("Hello")
|