1.1.rst 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. =========================
  2. Wagtail 1.1 release notes
  3. =========================
  4. .. contents::
  5. :local:
  6. :depth: 1
  7. What's new
  8. ==========
  9. ``specific()`` method on PageQuerySet
  10. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  11. 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.
  12. "Promoted search results" has moved into its own module
  13. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  14. Previously, this was implemented in :mod:`~wagtail.wagtailsearch` but now has
  15. been moved into a separate module: :mod:`wagtail.contrib.wagtailsearchpromotions`
  16. Atomic rebuilding of Elasticsearch indexes
  17. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. 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`.
  19. The :mod:`~wagtail.contrib.wagtailapi` module now uses Django REST Framework
  20. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  21. The ``wagtailapi`` module is now built on Django REST Framework and it now also has a `library of serialisers <https://github.com/wagtail/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.
  22. We hope to support more REST framework features, such as a browsable API, in future releases.
  23. Permissions fixes in the admin interface
  24. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  25. A number of inconsistencies around permissions in the admin interface were fixed in this release:
  26. * Removed all permissions for "User profile" (not used)
  27. * Removed "delete" permission for Images and documents (not used)
  28. * Users can now access images and documents when they only have the "change" permission (previously required "add" permission as well)
  29. * Permissions for Users now taken from custom user model, if set (previously always used permissions on Django's builtin User model)
  30. * Groups and Users now respond consistently to their respective "add", "change" and "delete" permissions
  31. Searchable snippets
  32. ~~~~~~~~~~~~~~~~~~~
  33. 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`.
  34. Minor features
  35. ~~~~~~~~~~~~~~
  36. * Implemented deletion of form submissions
  37. * Implemented pagination in the page chooser modal
  38. * Changed INSTALLED_APPS in project template to list apps in precedence order
  39. * The ``{% image %}`` tag now supports filters on the image variable, e.g. ``{% image primary_img|default:secondary_img width-500 %}``
  40. * Moved the style guide menu item into the Settings sub-menu
  41. * Search backends can now be specified by module (e.g. ``wagtail.wagtailsearch.backends.elasticsearch``), rather than a specific class (``wagtail.wagtailsearch.backends.elasticsearch.ElasticSearch``)
  42. * Added ``descendant_of`` filter to the API
  43. * Added optional directory argument to "wagtail start" command
  44. * Non-superusers can now view/edit/delete sites if they have the correct permissions
  45. * Image file size is now stored in the database, to avoid unnecessary filesystem lookups
  46. * Page URL lookups hit the cache/database less often
  47. * Updated URLs within the admin backend to use namespaces
  48. * The ``update_index`` task now indexes objects in batches of 1000, to indicate progress and avoid excessive memory use
  49. * Added database indexes on PageRevision and Image to improve performance on large sites
  50. * Search in page chooser now uses Wagtail's search framework, to order results by relevance
  51. * ``PageChooserPanel`` now supports passing a list (or tuple) of accepted page types
  52. * The snippet type parameter of ``SnippetChooserPanel`` can now be omitted, or passed as a model name string rather than a model class
  53. * 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
  54. * Added signposting text to the explorer to steer editors away from creating pages at the root level unless they are setting up new sites
  55. * "Clear choice" and "Edit this page" buttons are no longer shown on the page field of the group page permissions form
  56. * Altered styling of stream controls to be more like all other buttons
  57. * 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
  58. * New translations for Norwegian Bokmål and Icelandic
  59. Bug fixes
  60. ~~~~~~~~~
  61. * Text areas in the non-default tab of the page editor now resize to the correct height
  62. * Tabs in "insert link" modal in the rich text editor no longer disappear (Tim Heap)
  63. * H2 elements in rich text fields were accidentally given a click() binding when put insite a collapsible multi field panel
  64. * The ``wagtailimages`` module is now compatible with remote storage backends that do not allow reopening closed files
  65. * Search no longer crashes when auto-indexing a model that doesn't have an ``id`` field
  66. * The ``wagtailfrontendcache`` module's HTTP backend has been rewritten to reliably direct requests to the configured cache hostname
  67. * Resizing single pixel images with the "fill" filter no longer raises ``ZeroDivisionError`` or "tile cannot extend outside image"
  68. * 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``
  69. * Responses from the external image URL generator are correctly marked as streaming and will no longer fail when used with Django's cache middleware
  70. * Page copy now works with pages that use multiple inheritance
  71. * Form builder pages now pick up template variables defined in the ``get_context`` method
  72. * 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
  73. * Newly added redirects now take effect on all sites, rather than just the site that the Wagtail admin backend was accessed through
  74. * Add user form no longer throws a hard error on validation failure
  75. Upgrade considerations
  76. ======================
  77. "Promoted search results" no longer in :mod:`~wagtail.wagtailsearch`
  78. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  79. This feature has moved into a contrib module so is no longer enabled by default.
  80. To re-enable it, add :mod:`wagtail.contrib.wagtailsearchpromotions` to your ``INSTALLED_APPS``:
  81. .. code-block:: python
  82. INSTALLED_APPS = [
  83. ...
  84. 'wagtail.contrib.wagtailsearchpromotions',
  85. ...
  86. If you have references to the ``wagtail.wagtailsearch.models.EditorsPick`` model in your
  87. project, you will need to update these to point to the :mod:`wagtail.contrib.wagtailsearchpromotions.models.SearchPromotion` model instead.
  88. If you created your project using the ``wagtail start`` command with Wagtail 1.0,
  89. you will probably have references to this model in the ``search/views.py`` file.
  90. ``is_abstract`` flag on page models has been replaced by ``is_creatable``
  91. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  92. 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``.
  93. If you have used ``is_abstract = True`` on any of your models, you should now change this to ``is_creatable = False``.
  94. 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.