wagtail/docs/releases/1.6.rst

122 wiersze
6.0 KiB
ReStructuredText
Czysty Zwykły widok Historia

2016-05-23 14:17:58 +00:00
==========================================
Wagtail 1.6 release notes - IN DEVELOPMENT
==========================================
.. contents::
:local:
:depth: 1
What's new
==========
Django 1.10 support
~~~~~~~~~~~~~~~~~~~
Wagtail is now compatible with Django 1.10. Thanks to Mikalai Radchuk and Paul J Stevens for developing this, and to Tim Graham for reviewing and additional Django core assistance.
2016-05-23 14:17:58 +00:00
Minor features
~~~~~~~~~~~~~~
* Page slugs now allow unicode on Django >= 1.9 (Behzad Nategh)
* Image upload form in image chooser now performs client side validation so that the selected file is not lost in the submission (Jack Paine)
2016-06-08 10:36:27 +00:00
* oEmbed URL for audioBoom was updated (Janneke Janssen)
2016-06-08 13:53:01 +00:00
* Remember tree location in page chooser when switching between Internal / External / Email link (Matt Westcott)
2016-06-10 13:26:02 +00:00
* ``FieldRowPanel`` now creates equal-width columns automatically if ``col*`` classnames are not specified (Chris Rogers)
* Form builder now validates against multiple fields with the same name (Richard McMillan)
* The 'choices' field on the form builder no longer has a maximum length (Johannes Spielmann)
* The wagtailimages.Filter model has been removed, and converted to a Python class instead (Gagaro)
* Multiple ChooserBlocks inside a StreamField are now prefetched in bulk, for improved performance (Michael van Tellingen, Roel Bruggink, Matt Westcott)
2016-06-16 13:19:44 +00:00
* Added new EmailBlock and IntegerBlock (Oktay Altay)
2016-06-23 10:07:42 +00:00
* Added a new FloatBlock, DecimalBlock and a RegexBlock (Oktay Altay, Andy Babic)
2016-06-21 20:59:02 +00:00
* Wagtail version number is now shown on the settings menu (Chris Rogers)
* Added a system check to validate that fields listed in ``search_fields`` are defined on the model (Josh Schneier)
* Added formal APIs for customising the display of StructBlock forms within the page editor - see :ref:`custom_editing_interfaces_for_structblock` (Matt Westcott)
* ``wagtailforms.models.AbstractEmailForm`` now supports multiple email recipients (Serafeim Papastefanos)
2016-07-06 14:44:57 +00:00
* Added the ``include_block`` template tag for improved StreamField template inclusion. See :doc:`/topics/streamfield` for documentation (Matt Westcott)
* Added ability to delete users through Settings -> Users (Vincent Audebert; thanks also to Ludolf Takens and Tobias Schmidt for alternative implementations)
* Page previews now pass additional HTTP headers, to simulate the page being viewed by the logged-in user and avoid clashes with middleware (Robert Rollins)
2016-05-23 14:17:58 +00:00
Bug fixes
~~~~~~~~~
2016-06-15 17:15:21 +00:00
* Email templates and document uploader now support custom ``STATICFILES_STORAGE`` (Jonny Scholes)
* Removed alignment options (deprecated in HTML and not rendered by Wagtail) from ``TableBlock`` context menu (Moritz Pfeiffer)
* Fixed incorrect CSS path on ModelAdmin's "choose a parent page" view
* Prevent empty redirect by overnormalisation
2016-06-17 14:51:39 +00:00
* "Remove link" button in rich text editor didn't trigger "edit" event, leading to the change to sometimes not be persisted (Matt Westcott)
* ``RichText`` values can now be correctly evaluated as booleans (Mike Dingjan, Bertrand Bordage)
2016-06-17 12:06:03 +00:00
* wagtailforms no longer assumes an .html extension when determining the landing page template filename (kakulukia)
* Fixed styling glitch on bi-colour icon + text buttons in Chrome (Janneke Janssen)
2016-06-08 12:24:18 +00:00
2016-05-23 14:17:58 +00:00
Upgrade considerations
======================
Form builder ``FormField`` models require a migration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``choices`` field on the ``wagtailforms.models.AbstractFormField`` model has been changed from a ``CharField`` to a ``TextField``, to allow it to be of unlimited length. If you are using the ``wagtailforms`` module in your project, you will need to run ``python manage.py makemigrations`` and ``python manage.py migrate`` after upgrading, in order to apply this change to your form page models.
``wagtailimages.Filter`` model has been removed
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``wagtailimages.Filter`` model has been removed, and replaced with a ``Filter`` class instead. This class can be imported from the same location as the model: ``wagtail.wagtailimages.models.Filter``. The ``Filter`` class has the same API as the ``Filter`` model did, with the exception that Model methods such as ``Filter.save()``, and ``Filter.objects.get()`` have been removed.
``TagSearchable`` needs removing from custom image / document model migrations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The mixin class ``wagtail.wagtailadmin.taggable.TagSearchable``, used internally by image and document models, has been deprecated. If you are using custom image or document models in your project, the migration(s) which created them will contain frozen references to ``wagtail.wagtailadmin.taggable.TagSearchable``, which must now be removed. The line:
.. code-block:: python
import wagtail.wagtailadmin.taggable
should be replaced by:
.. code-block:: python
import wagtail.wagtailsearch.index
and the line:
.. code-block:: python
bases=(models.Model, wagtail.wagtailadmin.taggable.TagSearchable),
should be updated to:
.. code-block:: python
bases=(models.Model, wagtail.wagtailsearch.index.Indexed),
Adds the include_block template tag (#2786) Update render and render_basic methods on Block to take a context kwarg Update TableBlock to support passing extra context to render Implement render_as_block on BoundBlock, StreamValue and StructValue. Collectively, these are the objects encountered during template rendering which typically render a block template when output inside {{ ... }} tags. Implementing render_as_block allows us to do the same thing, but passing a template context as well. Implement include_block tag Support extra context vars on include_block via 'with foo=bar' Support 'only' flag on include_block tag, to omit the parent context Update StreamField documentation to cover the include_block tag Rewrite 'BoundBlocks and values' docs based on the include_block tag Add tests for blocks with legacy render / render_basic methods Any bits of StreamField infrastructure that attempt to call render or render_basic on a block with a 'context' kwarg, should (for now) also work on blocks that don't accept the context kwarg, but output a RemovedInWagtail18Warning. Explicitly test whether render / render_basic will accept a 'context' kwarg This avoids unexpected behaviour when the method legitimately accepts a context kwarg, but happens to throw an unrelated TypeError - in this situation, the final output (or error diagnostics) will behave as if the context was never passed, making debugging difficult. See https://github.com/torchbox/wagtail/pull/2786#discussion_r69563984
2016-06-23 15:30:02 +00:00
``render`` and ``render_basic`` methods on StreamField blocks now accept a ``context`` keyword argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``render`` and ``render_basic`` methods on ``wagtail.wagtailcore.blocks.Block`` have been updated to accept an optional ``context`` keyword argument, a template context to use when rendering the block. If you have defined any custom StreamField blocks that override either of these methods, the method signature now needs to be updated to include this keyword argument:
.. code-block:: python
class MyBlock(Block):
def render(self, value):
...
def render_basic(self, value):
...
should now become:
.. code-block:: python
class MyBlock(Block):
def render(self, value, context=None):
...
def render_basic(self, value, context=None):
...