wagtail/docs/releases/0.4.rst

190 wiersze
5.7 KiB
ReStructuredText
Czysty Zwykły widok Historia

2014-07-08 12:26:08 +00:00
=========================
Wagtail 0.4 release notes
=========================
Whats new
=========
2014-07-08 12:55:19 +00:00
Private Pages
~~~~~~~~~~~~~
2014-07-08 12:26:08 +00:00
2014-07-08 13:17:10 +00:00
Wagtail now supports password protecting pages on the frontend allowing sections of your website to be made private.
:ref:`private_pages`
2014-07-08 12:26:08 +00:00
Python 3 support
~~~~~~~~~~~~~~~~
Wagtail now supports Python 3.2, 3.3 and 3.4.
Scheduled publishing
~~~~~~~~~~~~~~~~~~~~
Editors can now schedule pages to be published or unpublished at specified times.
A new management command has been added (:ref:`publish_scheduled_pages`) to publish pages that have been scheduled by an Editor.
2014-07-08 12:26:08 +00:00
Search on QuerySet with Elasticsearch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2014-07-08 12:55:19 +00:00
Its now possible to perform searches with Elasticsearch on ``PageQuerySet``s:
2014-07-08 12:26:08 +00:00
>>> from wagtail.wagtailcore.models import Page
>>> Page.objects.live().descendant_of(events_index).search("Hello")
[<Page: Event 1>, <Page: Event 2>]
Sitemap generation
~~~~~~~~~~~~~~~~~~
A new module has been added (``wagtail.contrib.wagtailsitemaps``) which produces XML sitemaps for Wagtail sites.
:ref:`sitemap_generation`
2014-07-08 12:26:08 +00:00
Front-end cache invalidation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A new module has been added (``wagtail.contrib.wagtailfrontendcache``) which invalidates pages in a frontend cache when they are updated or deleted in Wagtail.
:ref:`frontend_cache_purging`
2014-07-08 12:26:08 +00:00
Notification preferences
~~~~~~~~~~~~~~~~~~~~~~~~
2014-07-08 13:55:12 +00:00
Users can now decide which notifications they recieve from Wagtail using a new "Notification preferences" section located in the account settings.
2014-07-08 12:26:08 +00:00
Minor features
~~~~~~~~~~~~~~
2014-07-08 12:55:19 +00:00
2014-07-08 12:26:08 +00:00
Core
----
* Any extra arguments given to ``Page.serve`` are now passed through to ``get_context`` and ``get_template``
* Added ``in_menu`` and ``not_in_menu`` methods to ``PageQuerySet``
* Added ``search`` method to ``PageQuerySet``
2014-07-08 12:26:08 +00:00
* Added ``get_next_siblings`` and ``get_prev_siblings`` to ``Page``
* Added ``page_published`` signal
* Added ``copy`` method to ``Page`` to allow copying of pages
* Added ``construct_whitelister_element_rules`` hook for customising the HTML whitelist used when saving ``RichText`` fields
* Support for setting a ``subpage_types`` property on ``Page`` models, to define which page types are allowed as subpages
Admin
-----
2014-07-08 13:17:10 +00:00
* Removed the "More" section from the menu
* Added pagination to page listings
2014-07-08 12:26:08 +00:00
* Added a new datetime picker widget
* Updated hallo.js to version 1.0.4
* Aesthetic improvements to preview experience
* Login screen redirects to dashboard if user is already logged in
* Snippets are now ordered alphabetically
* Added ``init_new_page`` signal
Search
------
* Added a new way to configure searchable/filterable fields on models
* Added ``get_indexed_objects`` allowing developers to customise which objects get added to the search index
* Major refactor of Elasticsearch backend
* Use ``match`` instead of ``query_string`` queries
* Fields are now indexed in Elasticsearch with their correct type
2014-07-09 08:52:33 +00:00
* Filter fields are no longer included in '_all'
* Fields with partial matching are now indexed together into '_partials'
2014-07-08 12:26:08 +00:00
Images
------
* Added ``original`` as a resizing rule supported by the ``{% image %}`` tag
* ``image`` tag now accepts extra keyword arguments to be output as attributes on the img tag
* Added an ``attrs`` property to image rendition objects to output ``src``, ``width``, ``height`` and ``alt`` attributes all in one go
Other
-----
2014-07-08 12:26:08 +00:00
* Added styleguide (mainly for wagtail developers)
Bug fixes
~~~~~~~~~
* Animated GIFs are now coalesced before resizing
* Wand backend clones images before modifying them
* Admin breadcrumb now positioned correctly on mobile
* Page chooser breadcrumb now updates the chooser modal instead of linking to Explorer
* Embeds - Fixed crash when no HTML field is sent back from the embed provider
* Multiple sites with same hostname but different ports are now allowed
* No longer possible to create multiple sites with ``is_default_site = True``
Backwards incompatible changes
==============================
2014-07-08 12:55:19 +00:00
2014-07-08 13:17:10 +00:00
ElasticUtils replaced with elasticsearch-py
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2014-07-08 12:26:08 +00:00
2014-07-08 13:17:10 +00:00
If you are using the elasticsearch backend, you must install the ``elasticsearch`` module into your environment.
.. note::
If you are using an older version of Elasticsearch (< 1.0) you must install ``elasticsearch`` version 0.4.x.
2014-07-08 12:26:08 +00:00
Deprecated features
===================
2014-07-08 12:55:19 +00:00
Template tag libraries renamed
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following template tag libraries have been renamed:
* ``pageurl`` => ``wagtailcore_tags``
* ``rich_text`` => ``wagtailcore_tags``
* ``embed_filters`` => ``wagtailembeds_tags``
* ``image_tags`` => ``wagtailimages_tags``
New search field configuration format
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2014-07-08 13:17:10 +00:00
``indexed_fields`` is now deprecated and has been replaced by a new search field configuration format called ``search_fields``.
2014-07-08 12:55:19 +00:00
``Page.route`` method should now return a ``RouteResult``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2014-07-08 12:55:19 +00:00
2014-07-08 13:17:10 +00:00
Previously, the ``route`` method called ``serve`` and returned a ``HttpResponse`` object. This has now been split up so ``serve`` is called separately and ``route`` must now return a RouteResult object.
:ref:`anatomy_of_a_wagtail_request`
2014-07-08 12:55:19 +00:00
2014-07-08 13:17:10 +00:00
Wagtailadmins ``hooks`` module has moved to wagtailcore
2014-07-08 12:55:19 +00:00
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2014-07-08 13:17:10 +00:00
If you use any ``wagtail_hooks.py`` files in your project, you may have an import like: ``from wagtail.wagtailadmin import hooks``
Change this to: ``from wagtail.wagtailcore import hooks``
2014-07-08 12:55:19 +00:00
Miscellaneous
~~~~~~~~~~~~~
2014-07-08 12:26:08 +00:00
* ``Page.show_as_mode`` replaced with ``Page.serve_preview``
* ``Page.get_page_modes`` method replaced with ``Page.preview_modes`` property
* ``Page.get_other_siblings`` replaced with ``Page.get_siblings(inclusive=False)``