2015-12-23 18:49:30 +01:00
=========================
Wagtail 1.3 release notes
=========================
2015-11-04 13:20:07 +01:00
.. contents ::
:local:
:depth: 1
What's new
==========
2015-12-09 12:40:12 +01:00
Django 1.9 support
~~~~~~~~~~~~~~~~~~
Wagtail is now compatible with Django 1.9.
2015-11-04 13:20:07 +01:00
2015-12-11 13:46:01 +01:00
Indexing fields across relations in Elasticsearch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fields on related objects can now be indexed in Elasticsearch using the new `` indexed.RelatedFields `` declaration type:
.. code-block :: python
2016-07-05 16:00:32 +02:00
class Book(models.Model, index.Indexed):
2015-12-11 13:46:01 +01:00
...
search_fields = [
2016-07-05 16:00:32 +02:00
index.SearchField('title'),
index.FilterField('published_date'),
2015-12-11 13:46:01 +01:00
2016-07-05 16:00:32 +02:00
index.RelatedFields('author', [
index.SearchField('name'),
index.FilterField('date_of_birth'),
2015-12-11 13:46:01 +01:00
]),
]
# Search books where their author was born after 1950
# Both the book title and the authors name will be searched
>>> Book.objects.filter(author__date_of_birth__gt=date(1950, 1, 1)).search("Hello")
See: :ref: `wagtailsearch_index_relatedfields`
2015-12-14 22:06:31 +01:00
Cross-linked admin search UI
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The search interface in the Wagtail admin now includes a toolbar to quickly switch between different search types - pages, images, documents and users. A new :ref: `register_admin_search_area <register_admin_search_area>` hook is provided for adding new search types to this toolbar.
2015-11-04 13:20:07 +01:00
Minor features
~~~~~~~~~~~~~~
2015-12-15 16:57:24 +01:00
* Added `` WagtailPageTests `` , a helper module to simplify writing tests for Wagtail sites. See :doc: `/advanced_topics/testing`
2015-12-15 16:59:57 +01:00
* Added system checks to check the `` subpage_types `` and `` parent_page_types `` attributes of page models
2015-11-18 14:04:50 +01:00
* Added `` WAGTAIL_PASSWORD_RESET_ENABLED `` setting to allow password resets to be disabled independently of the password management interface (John Draper)
2015-12-15 16:59:55 +01:00
* Submit for moderation notification emails now include the editor name (Denis Voskvitsov)
2015-11-18 18:04:39 +01:00
* Updated fonts for more comprehensive Unicode support
2015-11-19 16:30:23 +01:00
* Added `` .alt `` attribute to image renditions
2015-11-19 01:12:48 +01:00
* The default `` src `` , `` width `` , `` height `` and `` alt `` attributes can now be overridden by attributes passed to the `` {% image %} `` tag
2015-11-27 17:15:21 +01:00
* Added keyboard shortcuts for preview and save in the page editor
2015-12-03 14:19:44 +01:00
* Added `` Page `` methods `` can_exist_under `` , `` can_create_at `` , `` can_move_to `` for customising page type business rules
2015-12-04 12:02:08 +01:00
* `` wagtailadmin.utils.send_mail `` now passes extra keyword arguments to Django's `` send_mail `` function (Matthew Downey)
2015-12-04 12:07:43 +01:00
* `` page_unpublish `` signal is now fired for each page that was unpublished by a call to `` PageQuerySet.unpublish() ``
2015-12-15 16:59:57 +01:00
* Add `` get_upload_to `` method to `` AbstractImage `` , to allow overriding the default image upload path (Ben Emery)
2015-11-29 01:22:37 +01:00
* Notification emails are now sent per user (Matthew Downey)
2015-09-24 04:04:48 +02:00
* Added the ability to override the default manager on Page models
2015-12-15 01:03:06 +01:00
* Added an optional human-friendly `` site_name `` field to sites (Timo Rieber)
2015-12-16 17:18:25 +01:00
* Added a system check to warn developers who use a custom Wagtail build but forgot to build the admin css
2015-10-15 11:45:52 +02:00
* Added success message after updating image from the image upload view (Christian Peters)
2015-10-27 12:47:24 +01:00
* Added a `` request.is_preview `` variable for templates to distinguish between previewing and live (Denis Voskvitsov)
2015-10-30 00:32:09 +01:00
* 'Pages' link on site stats dashboard now links to the site homepage when only one site exists, rather than the root level
2015-11-18 18:17:36 +01:00
* Added support for chaining multiple image operations on the `` {% image %} `` tag (Christian Peters)
2015-12-17 14:42:59 +01:00
* New translations for Arabic, Latvian and Slovak
2015-11-18 14:04:50 +01:00
2015-11-04 13:20:07 +01:00
Bug fixes
~~~~~~~~~
2015-11-11 06:01:20 +01:00
* Images and page revisions created by a user are no longer deleted when the user is deleted (Rich Atkinson)
2015-11-17 12:36:57 +01:00
* HTTP cache purge now works again on Python 2 (Mitchel Cabuloy)
2015-11-23 21:52:46 +01:00
* Locked pages can no longer be unpublished (Alex Bridge)
2015-11-17 06:36:00 +01:00
* Site records now implement `` get_by_natural_key ``
2015-12-15 16:59:57 +01:00
* Creating pages at the root level (and any other instances of the base `` Page `` model) now properly respects the `` parent_page_types `` setting
2015-12-02 18:24:49 +01:00
* Settings menu now opens correctly from the page editor and styleguide views
2015-12-03 14:19:44 +01:00
* `` subpage_types `` / `` parent_page_types `` business rules are now enforced when moving pages
2015-12-03 20:43:31 +01:00
* Multi-word tags on images and documents are now correctly preserved as a single tag (LKozlowski)
2015-12-08 13:19:17 +01:00
* Changed verbose names to start with lower case where necessary (Maris Serzans)
2015-12-15 16:06:49 +01:00
* Invalid images no longer crash the image listing (Maris Serzans)
2015-12-15 17:30:36 +01:00
* `` MenuItem `` `` url `` parameter can now take a lazy URL (Adon Metcalfe, rayrayndwiga)
2015-12-14 11:58:00 +01:00
* Added missing translation tag to InlinePanel 'Add' button (jnns)
2015-12-17 00:14:45 +01:00
* Added missing translation tag to 'Signing in...' button text (Eugene MechanisM)
2015-12-15 22:53:06 +01:00
* Restored correct highlighting behaviour of rich text toolbar buttons
2015-10-23 13:11:44 +02:00
* Rendering a missing image through ImageChooserBlock no longer breaks the whole page (Christian Peters)
2015-12-16 17:29:15 +01:00
* Filtering by popular tag in the image chooser now works when using the database search backend
2015-11-17 12:36:57 +01:00
2015-11-04 13:20:07 +01:00
Upgrade considerations
======================
2015-11-20 18:26:17 +01:00
2015-12-08 23:42:36 +01:00
Jinja2 template tag modules have changed location
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Due to a change in the way template tags are imported in Django 1.9, it has been necessary to move the Jinja2 template tag modules from "templatetags" to a new location, "jinja2tags". The correct configuration settings to enable Jinja2 templates are now as follows:
.. code-block :: python
TEMPLATES = [
# ...
{
'BACKEND': 'django.template.backends.jinja2.Jinja2',
'APP_DIRS': True,
'OPTIONS': {
'extensions': [
2017-11-17 11:23:27 +01:00
'wagtail.core.jinja2tags.core',
2015-12-08 23:42:36 +01:00
'wagtail.wagtailadmin.jinja2tags.userbar',
'wagtail.wagtailimages.jinja2tags.images',
],
},
}
]
See: :doc: `/advanced_topics/jinja2`
2015-11-20 18:26:17 +01:00
ContentType-returning methods in wagtailcore are deprecated
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following internal functions and methods in `` wagtail.wagtailcore.models `` , which return a list of `` ContentType `` objects, have been deprecated. Any uses of these in your code should be replaced by the corresponding new function which returns a list of model classes instead:
* `` get_page_types() `` - replaced by `` get_page_models() ``
* `` Page.clean_subpage_types() `` - replaced by `` Page.clean_subpage_models() ``
* `` Page.clean_parent_page_types() `` - replaced by `` Page.clean_parent_page_models() ``
* `` Page.allowed_parent_page_types() `` - replaced by `` Page.allowed_parent_page_models() ``
* `` Page.allowed_subpage_types() `` - replaced by `` Page.allowed_subpage_models() ``
2015-12-01 14:17:31 +01:00
In addition, note that these methods now return page types that are marked as `` is_creatable = False `` , including the base `` Page `` class. (Abstract models are not included, as before.)