RoutablePageMixin has a default index_route method that is decorated
with `@route(r'^$')`. This way, including RoutablePageMixin doesn't
force you to re-enable the default functionality you would expect from a
Page anyways.
index_route behaves exactly like a standard Wagtail Page.
To override the default behaviour, one can simply override the route by
decorating another function with r'^$'.
(as disussed in issue #2866)
We have to run python manage.py migrate once, in order to create the necessary tables for the postgres search backend.
Otherwise we get an error, as the insert in the table is not possible.
* Adds PostgreSQL search backend.
* Isort nitpicks.
* Fixes PostgreSQL versions incompatibilities.
* Uses Django lru_cache instead of building our own.
* Fixes PostgreSQL search index on some empty vector & query cases.
* Never sets the PostgreSQL search vector to NULL.
* Simplification + removes caching on two fast enough functions.
* Rewrites stale entries deletion to use the ORM.
* Split `helpers.py` into separate `url.py`, `permission.py` and `button.py`, dedicated to those separate concerns and update the docs accordingly
* Move `ThumbnailMixin` out to `mixins.py` and update documentation accordingly
* Ad #NOQA to import lines to hush pep errors
* Alphabetise helper import order
* - Delete `helpers/helpers.py`
- wagtal -> wagtail in docs
- Remove imports at the top of options.py and views.py that result in ImportError when those apps aren’t installed
- Alter ThumbnailMixin and InspectView to use the `wagtail.wagtailimages.shortcuts.get_rendition_or_not_found()` method to render images, which handles missing image source files gracefully, and reduces code duplication.
- Simplify `get_field_display_value()` by not limiting image and document rendering to ForeignKey fields. It should work consistently for property methods or other attributes too.
Stylistically this sentence is somewhat content-free (if the API is really "relatively straightforward", users can see that for themselves rather than us informing them of that fact...), and we don't want to encourage people to use undocumented methods (because we can't guarantee that the API for them will remain stable).
This is the correct lexer for interactive console sessions, according to
<http://pygments.org/docs/lexers/>. This does require command lines to
be prefixed with `$`, otherwise they are interpreted as the output of a
command. It highlights the command nicely, including environment
variables, strings, and comments.
* `result_row_display` adds a `data-object_pk` attribute to each row, to make items easier to identify with JS
* Adds `get_extra_attrs_for_row()` method to `ModelAdmin`, to give developers a way of adding further attributes to the `<tr>` element