2.8.rst 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. ==========================================
  2. Wagtail 2.8 release notes - IN DEVELOPMENT
  3. ==========================================
  4. .. contents::
  5. :local:
  6. :depth: 1
  7. What's new
  8. ==========
  9. Other features
  10. ~~~~~~~~~~~~~~
  11. * Removed leftover Python 2.x compatibility code (Sergey Fedoseev)
  12. * Combine flake8 configurations (Sergey Fedoseev)
  13. * Improved diffing behavior for text fields (Aliosha Padovani)
  14. * Improve contrast of disabled inputs (Nick Smith)
  15. * Added ``get_document_model_string`` function (Andrey Smirnov)
  16. * Added support for Cloudflare API tokens for frontend cache invalidation (Tom Usher)
  17. * Cloudflare frontend cache invalidation requests are now sent in chunks of 30 to fit within API limits (Tom Usher)
  18. * Added ``ancestors`` field to pages endpoint in admin API (Karl Hobley)
  19. * Removed Django admin management of ``Page`` & ``Site`` models (Andreas Bernacca)
  20. * Cleaned up Django docs URLs in documentation (Pete Andrew)
  21. * Add StreamFieldPanel to available panel types in documentation (Dan Swain)
  22. * Add {{ block.super }} example to ModelAdmin customisation in documentation (Dan Swain)
  23. * Add ability to filter image index by a tag (Benedikt Willi)
  24. Bug fixes
  25. ~~~~~~~~~
  26. * Rename documents listing column 'uploaded' to 'created' (LB (Ben Johnston))
  27. * Submenu items longer then the page height are no longer broken by the submenu footer (Igor van Spengen)
  28. * Unbundle the l18n library as it was bundled to avoid installation errors which have been resolved (Matt Westcott)
  29. * Prevent error when comparing pages that reference a model with a custom primary key (Fidel Ramos)
  30. * Moved ``get_document_model`` location so it can be imported when Models are not yet loaded (Andrey Smirnov)
  31. * Fixed incorrect HTML escaping of Jinja2 form templates for StructBlocks (Brady Moe)
  32. * All templates with wagtailsettings and modeladmin now use ``block.super`` for ``extra_js`` & ``extra_css`` (Timothy Bautista)
  33. * Layout issue when using FieldRowPanel with a heading (Andreas Bernacca)
  34. * ``file_size`` and ``file_hash`` not updated when Document file changed (Andreas Bernacca)
  35. Upgrade considerations
  36. ======================
  37. Removed support for Django 2.0
  38. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  39. Django 2.0 is no longer supported as of this release; please upgrade to Django 2.1 or above before upgrading Wagtail.
  40. API endpoint classes have moved
  41. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  42. For consistency with Django REST Framework, the ``PagesAPIEndpoint``, ``ImagesAPIEndpoint`` and ``DocumentsAPIEndpoint`` classes have been renamed to ``PagesAPIViewSet``, ``ImagesAPIViewSet`` and ``DocumentsAPIViewSet`` and moved to the ``views`` module in their respective packages. Projects using the Wagtail API should update their registration code accordingly.
  43. Old code:
  44. .. code-block:: python
  45. from wagtail.api.v2.endpoints import PagesAPIEndpoint
  46. from wagtail.api.v2.router import WagtailAPIRouter
  47. from wagtail.images.api.v2.endpoints import ImagesAPIEndpoint
  48. from wagtail.documents.api.v2.endpoints import DocumentsAPIEndpoint
  49. api_router = WagtailAPIRouter('wagtailapi')
  50. api_router.register_endpoint('pages', PagesAPIEndpoint)
  51. api_router.register_endpoint('images', ImagesAPIEndpoint)
  52. api_router.register_endpoint('documents', DocumentsAPIEndpoint)
  53. New code:
  54. .. code-block:: python
  55. from wagtail.api.v2.views import PagesAPIViewSet
  56. from wagtail.api.v2.router import WagtailAPIRouter
  57. from wagtail.images.api.v2.views import ImagesAPIViewSet
  58. from wagtail.documents.api.v2.views import DocumentsAPIViewSet
  59. api_router = WagtailAPIRouter('wagtailapi')
  60. api_router.register_endpoint('pages', PagesAPIViewSet)
  61. api_router.register_endpoint('images', ImagesAPIViewSet)
  62. api_router.register_endpoint('documents', DocumentsAPIViewSet)
  63. ``wagtail.documents.models.get_document_model`` has moved
  64. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  65. The ``get_document_model`` function should now be imported from ``wagtail.documents`` rather than ``wagtail.documents.models``. See :ref:`custom_document_model`.
  66. Removed ``Page`` and ``Site`` models from Django admin
  67. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  68. Django admin will no longer provide editing access to ``Page`` or ``Site`` models, if required these models can be registered within individual projects using `Django's ModelAdmin <https://docs.djangoproject.com/en/2.2/ref/contrib/admin/#modeladmin-objects>`_.
  69. .. code-block:: python
  70. # my_app/admin.py
  71. from django.contrib import admin
  72. from wagtail.core.models import Page, Site
  73. admin.site.register(Site)
  74. admin.site.register(Page)