wagtail/docs/releases/1.1.rst

132 wiersze
8.3 KiB
ReStructuredText
Czysty Zwykły widok Historia

=========================
Wagtail 1.1 release notes
=========================
.. contents::
:local:
:depth: 1
What's new
==========
2015-06-29 15:59:31 +00:00
``specific()`` method on PageQuerySet
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Usually, an operation that retrieves a queryset of pages (such as ``homepage.get_children()``) will return them as basic Page instances, which only include the core page data such as title. The ``specific()`` method (e.g. ``homepage.get_children().specific()``) now allows them to be retrieved as their most specific type, using the minimum number of queries.
"Promoted search results" has moved into its own module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Previously, this was implemented in :mod:`~wagtail.wagtailsearch` but now has
been moved into a separate module: :mod:`wagtail.contrib.wagtailsearchpromotions`
2015-08-01 09:13:46 +00:00
Atomic rebuilding of Elasticsearch indexes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Elasticsearch search backend now accepts an experimental ``ATOMIC_REBUILD`` flag which ensures that the existing search index continues to be available while the ``update_index`` task is running. See :ref:`wagtailsearch_backends_atomic_rebuild`.
The :mod:`~wagtail.contrib.wagtailapi` module now uses Django REST Framework
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``wagtailapi`` module is now built on Django REST Framework and it now also has a `library of serialisers <https://github.com/torchbox/wagtail/blob/stable/1.1.x/wagtail/contrib/wagtailapi/serializers.py>`_ that you can use in your own REST Framework based APIs. No user-facing changes have been made.
We hope to support more REST framework features, such as a browsable API, in future releases.
Permissions fixes in the admin interface
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A number of inconsistencies around permissions in the admin interface were fixed in this release:
* Removed all permissions for "User profile" (not used)
* Removed "delete" permission for Images and documents (not used)
* Users can now access images and documents when they only have the "change" permission (previously required "add" permission as well)
* Permissions for Users now taken from custom user model, if set (previously always used permissions on Djangos builtin User model)
* Groups and Users now respond consistently to their respective "add", "change" and "delete" permissions
2015-08-27 14:41:32 +00:00
Searchable snippets
~~~~~~~~~~~~~~~~~~~
Snippets that inherit from ``wagtail.wagtailsearch.index.Indexed`` are now given a search box on the snippet chooser and listing pages. See :ref:`wagtailsnippets_making_snippets_searchable`.
Minor features
~~~~~~~~~~~~~~
2015-08-26 13:08:20 +00:00
* Implemented deletion of form submissions
2015-07-08 15:25:34 +00:00
* Implemented pagination in the page chooser modal
2015-07-21 09:20:58 +00:00
* Changed INSTALLED_APPS in project template to list apps in precedence order
* The ``{% image %}`` tag now supports filters on the image variable, e.g. ``{% image primary_img|default:secondary_img width-500 %}``
2015-06-25 11:19:22 +00:00
* Moved the style guide menu item into the Settings sub-menu
2015-07-08 15:25:34 +00:00
* Search backends can now be specified by module (e.g. ``wagtail.wagtailsearch.backends.elasticsearch``), rather than a specific class (``wagtail.wagtailsearch.backends.elasticsearch.ElasticSearch``)
* Added ``descendant_of`` filter to the API
2015-07-19 15:19:14 +00:00
* Added optional directory argument to "wagtail start" command
2015-07-28 10:26:49 +00:00
* Non-superusers can now view/edit/delete sites if they have the correct permissions
2015-07-20 13:49:55 +00:00
* Image file size is now stored in the database, to avoid unnecessary filesystem lookups
2015-08-17 11:43:52 +00:00
* Page URL lookups hit the cache/database less often
2015-07-20 19:09:15 +00:00
* Updated URLs within the admin backend to use namespaces
2015-08-01 09:22:59 +00:00
* The ``update_index`` task now indexes objects in batches of 1000, to indicate progress and avoid excessive memory use
2015-08-20 15:53:56 +00:00
* Added database indexes on PageRevision and Image to improve performance on large sites
2015-08-25 09:06:17 +00:00
* Search in page chooser now uses Wagtail's search framework, to order results by relevance
2015-08-25 15:17:35 +00:00
* ``PageChooserPanel`` now supports passing a list (or tuple) of accepted page types
2015-08-28 09:59:19 +00:00
* The snippet type parameter of ``SnippetChooserPanel`` can now be omitted, or passed as a model name string rather than a model class
2015-09-03 09:38:13 +00:00
* Added aliases for the ``self`` template variable to accommodate Jinja as a templating engine: ``page`` for pages, ``field_panel`` for field panels / edit handlers, and ``value`` for blocks
2015-09-03 11:06:29 +00:00
* Added signposting text to the explorer to steer editors away from creating pages at the root level unless they are setting up new sites
2015-09-03 11:16:35 +00:00
* "Clear choice" and "Edit this page" buttons are no longer shown on the page field of the group page permissions form
2015-09-03 16:05:03 +00:00
* Altered styling of stream controls to be more like all other buttons
* Added ability to mark page models as not available for creation using the flag ``is_creatable``; pages that are abstract Django models are automatically made non-creatable
2015-09-04 13:21:55 +00:00
* New translations for Norwegian Bokmål and Icelandic
2015-07-15 10:36:16 +00:00
Bug fixes
~~~~~~~~~
* Text areas in the non-default tab of the page editor now resize to the correct height
* Tabs in "insert link" modal in the rich text editor no longer disappear (Tim Heap)
* H2 elements in rich text fields were accidentally given a click() binding when put insite a collapsible multi field panel
2015-08-26 11:04:53 +00:00
* The ``wagtailimages`` module is now compatible with remote storage backends that do not allow reopening closed files
2015-08-26 12:50:09 +00:00
* Search no longer crashes when auto-indexing a model that doesn't have an ``id`` field
2015-08-26 15:38:08 +00:00
* The ``wagtailfrontendcache`` module's HTTP backend has been rewritten to reliably direct requests to the configured cache hostname
2015-08-27 10:24:29 +00:00
* Resizing single pixel images with the "fill" filter no longer raises "ZeroDivisionError" or "tile cannot extend outside image"
2015-08-28 13:55:54 +00:00
* The queryset returned from ``search`` operations when using the database search backend now correctly preserves additional properties of the original query, such as ``prefetch_related`` / ``select_related``
2015-08-28 22:07:49 +00:00
* Responses from the external image URL generator are correctly marked as streaming and will no longer fail when used with Django's cache middleware
2015-09-02 13:54:58 +00:00
* Page copy now works with pages that use multiple inheritance
2015-09-03 14:30:36 +00:00
* Form builder pages now pick up template variables defined in the ``get_context`` method
* When copying a page, IDs of child objects within page revision records were not remapped to the new objects; this would cause those objects to be lost from the original page when editing the new one
2015-09-03 15:30:18 +00:00
* Newly added redirects now take effect on all sites, rather than just the site that the Wagtail admin backend was accessed through
2015-09-04 13:50:04 +00:00
* Add user form no longer throws a hard error on validation failure
Upgrade considerations
======================
"Promoted search results" no longer in :mod:`~wagtail.wagtailsearch`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This feature has moved into a contrib module so is no longer enabled by default.
To re-enable it, add :mod:`wagtail.contrib.wagtailsearchpromotions` to your ``INSTALLED_APPS``:
.. code-block:: python
INSTALLED_APPS = [
...
'wagtail.contrib.wagtailsearchpromotions',
...
If you have references to the ``wagtail.wagtailsearch.models.EditorsPick`` model in your
project, you will need to update these to point to the :mod:`wagtail.contrib.wagtailsearchpromotions.models.SearchPromotion` model instead.
2015-08-20 15:57:21 +00:00
If you created your project using the ``wagtail start`` command with Wagtail 1.0,
you will probably have references to this model in the ``search/views.py`` file.
``is_abstract`` flag on page models has been replaced by ``is_creatable``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Previous versions of Wagtail provided an undocumented ``is_abstract`` flag on page models - not to be confused with Django's ``abstract`` Meta flag - to indicate that it should not be included in the list of available page types for creation. (Typically this would be used on model classes that were designed to be subclassed to create new page types, rather than used directly.) To avoid confusion with Django's distinct concept of abstract models, this has now been replaced by a new flag, ``is_creatable``.
If you have used ``is_abstract = True`` on any of your models, you should now change this to ``is_creatable = False``.
It is not necessary to include this flag if the model is abstract in the Django sense (i.e. it has ``abstract = True`` in the model's ``Meta`` class), since it would never be valid to create pages of that type.