0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 17:36:49 +01:00
Commit Graph

151 Commits

Author SHA1 Message Date
Matt Westcott
b2fbd91864 Document the DOCUMENT_PASSWORD_REQUIRED_TEMPLATE setting 2017-06-16 14:50:48 +01:00
Matt Westcott
ea8ab5de45 Document Elasticsearch 5.4 incompatibility with ATOMIC_REBUILD 2017-06-07 15:08:48 +01:00
John Franey
3f8052064e Mention PostgreSQL backend in docs Search index
Updates the Search docs index to mention the new PostgreSQL backend
2017-05-30 20:48:46 +01:00
Matt Westcott
1f8edc8984 Cache Site.get_site_root_paths in the request scope (#3354) 2017-05-16 15:24:48 +01:00
Bertrand Bordage
e62d67bd73 Adds PostgreSQL search backend. (#3515)
* 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.
2017-04-12 16:16:16 +01:00
Andreas Nüßlein
bfd4a2ef4b Adding the Meta attribute group to Blocks.
The idea is that Streamfield-Blocks can be grouped in the CMS
by setting Meta's `group` attribute.
This gives a better overview, particularly with many blocks.
If the attribute remains unset, nothing changes.
2017-04-10 20:27:32 +01:00
Matt Westcott
6d553ab396 Document that 'format' on Date(Time)Block must be one of the recognised DATE(TIME)_INPUT_FORMATS 2017-03-31 16:46:00 +01:00
Bojan Mihelac
0f53afc5a6 Adds support for custom date and datetime formats (#2595)
It is possible to set default format for date/datetime inputs. This works together
with standard django localization.

    # django settings
    USE_I18N = True
    LANGUAGE_CODE = 'sl'

    # wagtail settings
    WAGTAIL_DATE_FORMAT = '%d.%m.%Y.'
    WAGTAIL_DATETIME_FORMAT = '%d.%m.%Y. %H:%M'

DateBlock, DateTimeBlock accepts additional keyword argument `format`.
2017-03-31 16:30:27 +01:00
Nick Smith
48949e69a7 Add to StreamField migrations documentation
- Add example code for migrating draft pages and page revisions
2017-03-30 21:37:12 +01:00
Kees Hink
6961f33078 Restrict view_draft to can_publish / can_edit permissions (#3474) 2017-03-24 11:54:10 +01:00
Scot Hacker
6364104282 Document get_rendition() 2017-02-21 22:48:20 +00:00
Mikalai Radchuk
eb47526888 Enhancement for PageChooserBlock
Allow the target_model argument to be a list or tuple.
2017-02-17 11:30:32 +00:00
Matt Westcott
bd9455a11b Document wagtailsearch settings for Amazon Elasticsearch Service (#3345)
Resolves #2776
2017-02-08 18:58:24 +00:00
Matt Westcott
19310a84ed Documentation and release notes for #3275 2017-01-16 18:51:42 +00:00
Mikela Clemmons
26b7071307 RegexBlock error_message typo in docs
In the documention an example had a singular
2017-01-13 10:06:19 +00:00
Nikolai R Kristiansen
54bfd1a802 docs: Fix INDEX_SETTINGS in ES search backend ex.
The key `number_of_shards` lives below the `index` key.

Ref: https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-create-index.html#create-index-settings
2017-01-06 11:23:16 +00:00
J. Heasly
9424a8eab9 Give indication that there may be other template bits necessary for tag to work.
I came to this page from "Getting Started" template examples where all pages examples are rendered within {% block content %} tags which are not in these template examples."
;
2017-01-05 10:14:07 +00:00
Matt Westcott
5e13a1d674 Remove old versionadded line 2016-12-15 16:23:05 +00:00
Matt Westcott
6f834c9a9b Update links to github.com/torchbox to point to github.com/wagtail 2016-12-15 11:49:49 +00:00
pyMan
7d1114c1a1 Extra ES params passed through new OPTIONS key
Closes #2778

Extra ES params are now passed through new OPTIONS key in the
WAGTAILSEARCH_BACKENDS setting.

It's backward compatible: if no OPTIONS key is found and some parameters
still exist, those parameters are used for the ES constructor..
2016-12-01 12:04:14 +00:00
Karl Hobley
18316d627d Added Elasticsearch 5 to search backend docs 2016-11-30 16:31:20 +00:00
Scot Hacker
2882775842 Add BlockQuoteBlock to core block types 2016-11-29 10:13:10 +00:00
Mikalai Radchuk
55bdae573b Add support of callable choices for ChoiceBlock
Fixes #2809
2016-11-28 17:44:35 +00:00
Tim Heap
16213db0f8 Remove old versionadded notes
A step has been added to the release process notes to do this for future
releases as well.

https://github.com/torchbox/wagtail/wiki/Creating-a-new-Wagtail-release
2016-11-28 13:41:35 +00:00
Tim Heap
6ba34636cb Fix whitespace errors in docs
Trimmed trailing whitespace, convert tabs to 4 spaces, add preference
for spaces to `.editorconfig`.
2016-11-28 13:41:35 +00:00
Tim Heap
254e675634 Use .. code-block:: console for all shell commands
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.
2016-11-28 13:41:35 +00:00
Tim Heap
f742d4a476 Use .. code-block:: for all python, html blocks 2016-11-28 13:41:34 +00:00
Benoit Vogel
2fba07ad8e Implemented StaticBlock
Uses admin_text which is a Meta attribute.
* StaticBlock code in wagtailcore/blocks + tests
* StaticBlock in Streamfield docs
2016-11-15 10:29:06 +00:00
Matt Westcott
59e9a31bc1 Document the fact that a matching version of the elasticsearch package must be used 2016-11-04 11:14:12 +00:00
Matt Westcott
8de1b1b16f Release note for #3035 2016-11-03 16:58:54 +00:00
Matt Westcott
1b2cb50a84 Add documentation for bulk delete permission 2016-11-03 16:58:50 +00:00
Matt Westcott
5c9fc29fbe Mention that deleting a published page requires publish permission 2016-11-03 16:10:11 +00:00
Matt Westcott
e681cb3626 Add documentation about permission configuration 2016-11-03 16:10:09 +00:00
Tim Heap
9d54031a50 Add PageChooserBlock target_model option
It allows selecting a restricted subset of pages, like with the
PageChooserPanel
2016-10-26 13:01:46 +01:00
Matt Westcott
a326cd8559 Custom Page Manager documentation fix
Thanks to @nimasmi for reporting!
2016-10-25 11:48:02 +01:00
Matt Westcott
534b5d1fd9 Release note for #2474 2016-10-05 16:03:54 +01:00
Karl Hobley
2a6f908972 Various docs tweaks
Thanks @tomdyson for spotting!
2016-10-05 15:54:05 +01:00
Karl Hobley
6c57b5b280 Docs for format and jpegquality image filters
This also fixes #1205
2016-10-05 15:54:05 +01:00
Karl Hobley
9a57e39cfd Implemented annotate_score on SearchResults
This allows the user to retrieve the scores for each search result:

    for page in Page.objects.search("Hello").annotate_score('_score'):
        print(page.title, page._score)
2016-09-22 12:03:23 +01:00
Mikalai Radchuk
5598910a2b Release notes for #2573 2016-08-31 14:13:47 +03:00
Karl Hobley
daa82936d7 Elasticsearch 2 support (#2573)
* Created Elasticsearch 2 backend

* Added tests for Elasticsearch 2 backend

* Split models up into different indices

pages, images and documents are now in separate indices

* Prefix fields of child models to prevent mapping clashes

* Replaced index_analyzer with analyzer/search_analyzer

index_analyzer has been removed in Elasticsearch 2.0

https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_20_mapping_changes.html#_analyzer_mappings

There's no indication in Elasticsearch's docs that this wouldn't work on Elasticsearch 1.x. However, we found that the new configuration isn't reliable on Elasticsearch 1.6 and below (causes the test_query_analyzer test to fail randomly).

* Implemented new way of representing content types in search index

Instead of using a long string of model names that is queried using a
"prefix" query, we instead use a multi-value string field and query it
using a simple "match" query.

The only reason why this isn't implemented in the Elasticsearch 1.x
backend yet is backwards compatibility

* Added another child model of SearchTest with clashing field mapping

This checks that the namespacing of fields on child models is working properly (if it doesn't the update_index tests will fail)

* Added tests for get_model_root function

* fixup! Added tests for get_model_root function

* Docs updates for Elasticsearch 2 support

Also tweak examples to use elasticsearch2 backend by default

* Test against Elasticsearch 2 on travis
2016-08-31 13:46:57 +03:00
Karl Hobley
e29f9b2423 No longer say that ATOMIC_REBUILD is "Experimental"
We've used this in production on a few sites for over a year now and haven't hit any problems.
2016-08-31 09:54:35 +01:00
Matt Westcott
7bc819640d Restore PageManager behaviour by setting it on an abstract superclass of Page
Django's standard behaviour is to preserve managers that are set on abstract
superclasses, so this allows us to eliminate the metaclass hackery.

Fixes #2933
2016-08-23 20:12:22 +01:00
David Burke
db54a9f0c4 Update IntegerBlock docs to show correct kwargs (#2930)
It should be max and min value - not length. See [here](07c3ba84fb/wagtail/wagtailcore/blocks/field_block.py (L306)).

So this would work 

`blocks.IntegerBlock(max_value=10, min_value=0)`

but this wouldn't do anything

`blocks.IntegerBlock(max_length=10, min_length=0)`
2016-08-20 02:38:00 +01:00
Matt Westcott
bc7739e104 Add usage examples for EmailBlock, IntegerBlock, DecimalBlock
Thanks to @OktayAltay for the original pull request.
2016-08-08 20:15:45 +01:00
Nik Nyby
389317c104 docs: fix typo (#2845) 2016-07-15 21:58:47 +03:00
Matt Westcott
be1e1927c5 Promote include_block and unicode page slugs to major features 2016-07-07 11:20:43 +01:00
Matt Westcott
dbc4c9b28e 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-07-06 17:44:02 +03:00
Matt Westcott
9961455c6a Add formal support for customising the form rendering of StructBlocks
The `form_template` attribute was mentioned in passing in the docs, but was missing various things
to make it fully useful:

- context passed to form_template now includes 'prefix' and 'block_definition'
- context for the form is now populated in a separate overrideable `get_form_context` method
- full documentation and tests for form_template and get_form_context added
2016-07-05 11:48:09 +01:00
Matt Westcott
5758b54f2e Support error_messages dict as argument to RegexBlock
The individual `error_message` kwarg on RegexField is deprecated in Django 1.8
(and removed in Django 1.10), so it's appropriate for RegexBlock to follow the
same convention.
2016-06-28 16:11:52 +01:00