<commit_before>=========================
Wagtail 1.2 release notes
=========================

.. contents::
    :local:
    :depth: 1


What's new
==========

Site settings module
~~~~~~~~~~~~~~~~~~~~

Wagtail now includes a contrib module (previously available as the `wagtailsettings <https://pypi.python.org/pypi/wagtailsettings/>`_ package) to allow administrators to edit site-specific settings.

See: :doc:`/reference/contrib/settings`


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.

Note that the variable name ``self`` is reserved in Jinja2, and so Wagtail now provides alternative variable names where ``self`` was previously used: ``page`` to refer to page objects, and ``value`` to refer to StreamField blocks. All code examples in this documentation have now been updated to use the new variable names, for compatibility with Jinja2; however, users of the default Django template engine can continue to use ``self``.

See: :doc:`/advanced_topics/jinja2`


Site-specific redirects
~~~~~~~~~~~~~~~~~~~~~~~

You can now create redirects for a particular site using the admin interface.


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 two new keyword arguments:

 * ``operator``, to determine whether multiple search terms will be treated as 'or' (any term may match) or 'and' (all terms must match);
 * ``order_by_relevance``, set to True (the default) to order by relevance or False to preserve the QuerySet's original ordering.

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`


``get_context`` on StreamField blocks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

StreamField blocks now :ref:`provide a get_context method <streamfield_get_context>` that can be overridden to pass additional variables to the block's template.


Browsable API
~~~~~~~~~~~~~

The Wagtail API now incorporates the browsable front-end provided by Django REST Framework. Note that this must be enabled by adding ``'rest_framework'`` to your project's ``INSTALLED_APPS`` setting.


Python 3.5 support
~~~~~~~~~~~~~~~~~~

Wagtail now supports Python 3.5 when run in conjunction with Django 1.8.6 or later.


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 (<NAME>)
 * The ``first_published_at`` and ``latest_revision_created_at`` fields on page models are now available as filter fields on search queries
 * Wagtail admin now standardises on a single thumbnail image size, to reduce the overhead of creating multiple renditions
 * Rich text fields now strip out HTML comments
 * Page editor form now sets ``enctype="multipart/form-data"`` as appropriate, allowing FileField to be used on page models (Petr Vacha)
 * Explorer navigation menu on a completely empty page tree now takes you to the root level, rather than doing nothing
 * Added animation and fixed display issues when focusing a rich text field (<NAME>)
 * Added a system check to warn if Pillow is compiled without JPEG / PNG support
 * Page chooser now prevents users from selecting the root node where this would be invalid
 * New translations for Dutch (Netherlands), Georgian, Swedish and Turkish (Turkey)

Bug fixes
~~~~~~~~~

 * Page slugs are no longer auto-updated from the page title if the page is already published
 * Deleting a page permission from the groups admin UI does not immediately submit the form<commit_msg>Reword 1.2 release note<commit_after>=========================
Wagtail 1.2 release notes
=========================

.. contents::
    :local:
    :depth: 1


What's new
==========

Site settings module
~~~~~~~~~~~~~~~~~~~~

Wagtail now includes a contrib module (previously available as the `wagtailsettings <https://pypi.python.org/pypi/wagtailsettings/>`_ package) to allow administrators to edit site-specific settings.

See: :doc:`/reference/contrib/settings`


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.

Note that the variable name ``self`` is reserved in Jinja2, and so Wagtail now provides alternative variable names where ``self`` was previously used: ``page`` to refer to page objects, and ``value`` to refer to StreamField blocks. All code examples in this documentation have now been updated to use the new variable names, for compatibility with Jinja2; however, users of the default Django template engine can continue to use ``self``.

See: :doc:`/advanced_topics/jinja2`


Site-specific redirects
~~~~~~~~~~~~~~~~~~~~~~~

You can now create redirects for a particular site using the admin interface.


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 two new keyword arguments:

 * ``operator``, to determine whether multiple search terms will be treated as 'or' (any term may match) or 'and' (all terms must match);
 * ``order_by_relevance``, set to True (the default) to order by relevance or False to preserve the QuerySet's original ordering.

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`


``get_context`` on StreamField blocks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

StreamField blocks now :ref:`provide a get_context method <streamfield_get_context>` that can be overridden to pass additional variables to the block's template.


Browsable API
~~~~~~~~~~~~~

The Wagtail API now incorporates the browsable front-end provided by Django REST Framework. Note that this must be enabled by adding ``'rest_framework'`` to your project's ``INSTALLED_APPS`` setting.


Python 3.5 support
~~~~~~~~~~~~~~~~~~

Wagtail now supports Python 3.5 when run in conjunction with Django 1.8.6 or later.


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 ``class`` attributes 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 (<NAME>)
 * The ``first_published_at`` and ``latest_revision_created_at`` fields on page models are now available as filter fields on search queries
 * Wagtail admin now standardises on a single thumbnail image size, to reduce the overhead of creating multiple renditions
 * Rich text fields now strip out HTML comments
 * Page editor form now sets ``enctype="multipart/form-data"`` as appropriate, allowing FileField to be used on page models (<NAME>)
 * Explorer navigation menu on a completely empty page tree now takes you to the root level, rather than doing nothing
 * Added animation and fixed display issues when focusing a rich text field (<NAME>)
 * Added a system check to warn if Pillow is compiled without JPEG / PNG support
 * Page chooser now prevents users from selecting the root node where this would be invalid
 * New translations for Dutch (Netherlands), Georgian, Swedish and Turkish (Turkey)

Bug fixes
~~~~~~~~~

 * Page slugs are no longer auto-updated from the page title if the page is already published
 * Deleting a page permission from the groups admin UI does not immediately submit the form
{'fraction_non_alphanumeric': 0.11721037222919281, 'fraction_numerical': 0.0035549979088247597, 'mean_word_length': 5.2393998695368555, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2058591', 'n_tokens_mistral': 2472, 'n_tokens_neox': 2309, 'n_words': 1238}