0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00
Commit Graph

6382 Commits

Author SHA1 Message Date
Karl Hobley
e592cbf65c Implement support for ordering and searching at the same time over the API (#2732)
When the API was originally created, this was not possible to do with Wagtail search. So I added a check to prevent people from doing it.

Custom ordering was implemented in Wagtailsearch in #1815 so this can now be switched on.
2016-07-19 16:09:41 +01:00
Matt Westcott
e3483a8bd3 Add 'download' attribute to document download links (#2808)
Partially fixes #2513 - Firefox and Chrome (and hopefully Edge >=13) do not trigger
onbeforeunload events when following these links. Safari and IE don't currently
support it, though.
2016-07-19 16:05:46 +01:00
Karl Hobley
d9a3d5200f Django 1.11: Added ALLOWED_HOSTS to a few tests (#2853)
ALLOWED_HOSTS is now required in tests. See: 17e661641d
2016-07-19 15:26:26 +01:00
Karl Hobley
290c786c02 rollback to Drone 0.4
Should solve the reliability issues
2016-07-19 15:20:29 +01:00
Matt Westcott
f5cc8a3f2a Remove dubious GroupForm test that fails on Django 1.10rc1 (#2854)
test_group_form_includes_non_registered_permissions_in_initial_data fails in
Django 1.10rc1 because the native value of a ManyToManyField (as reflected in
form.initial) is now a queryset rather than a list of PKs. However, this test
is not actually testing anything meaningful. It asserts that the initial
value of the 'permissions' field includes any permissions the group has which
are not included in registered_permissions; however, since these permissions
don't appear in the form, it's inconsequential whether they're included or not.
2016-07-19 15:12:57 +01:00
Karl Hobley
ef56a3ebcb Fixed search tests (#2850)
A test was mutating the search_fields attribute of the SearchTest model causing subsequent tests that depended on the previous value to fail.
2016-07-19 13:24:32 +01:00
Matt Westcott
15ef4fcca7 Revert "Elasticsearch: Replaced usage of index_analyzer (#2568)"
This reverts commit d14150eb43.
2016-07-19 12:12:48 +01:00
Matt Westcott
0714cddd54 Release note for #2848 2016-07-19 10:45:19 +01:00
Danielle Madeley
e128921cfb Support https links for Flickr (#2848) 2016-07-19 10:37:16 +01:00
Matt Westcott
d3bdd64cc5 Add release notes for 1.5.3
Conflicts:
	CHANGELOG.txt
	docs/releases/index.rst
2016-07-18 19:15:27 +01:00
Matt Westcott
0308795490 Add release notes for 1.4.6
Conflicts:
	CHANGELOG.txt
	docs/releases/index.rst
2016-07-18 19:14:28 +01:00
Mikalai Radchuk
f03980e34b Fixes typo in wagtailadmin/block_forms/stream.html (#2847)
Thank @dburakov for the report!
2016-07-18 14:53:57 +01:00
Nik Nyby
389317c104 docs: fix typo (#2845) 2016-07-15 21:58:47 +03:00
Liam Brenner
4d77589f86 Pin html5lib to 0.999999 2016-07-15 14:41:54 +01:00
Karl Hobley
d14150eb43 Elasticsearch: Replaced usage of index_analyzer (#2568)
index_analyzer has been removed in Elasticsearch 2.0. But the new way works in older versions as well so I think it's worth switching to the new way now.

https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_20_mapping_changes.html#_analyzer_mappings
2016-07-14 10:50:10 +03:00
Karl Hobley
89191934fa Validate search fields argument (#2567) 2016-07-14 10:44:29 +03:00
Karl Hobley
2f8d00222d Initial work on the Admin API (#2507) 2016-07-13 13:26:43 +03:00
Matt Westcott
bdd80dd33e Fix styling of email fields in AbstractEmailForm example (#2821)
classname="full" is incorrect here (it generates excessive padding); also, using a FieldRowPanel
can make the display neater.
2016-07-08 16:47:54 +03:00
Matt Westcott
cca1ab4089 Eliminate Django 2.0 deprecation warnings for on_delete, is_anonymous, is_authenticated (#2829)
* Add on_delete kwarg to foreign keys that are missing it

* Add compat functions for user.is_anonymous and user.is_authenticated
2016-07-08 16:33:16 +03:00
Mikalai Radchuk
07ac5aa8ee Release notes for #2830 2016-07-08 16:15:19 +03:00
Matt Westcott
64aac99d97 Add back buttons to page delete / unpublish confirmation pages
Fixes #2213
2016-07-08 16:11:30 +03:00
Matt Westcott
be1e1927c5 Promote include_block and unicode page slugs to major features 2016-07-07 11:20:43 +01:00
Robert Rollins
cbabc3d9c7 Page.dummy_request() now takes an optional request object argument.
When building a dummy request, you can now pass in the original request object
to add additional information to the dummy. Currently, that includes the
following headers:
REMOTE_ADDR
HTTP_X_FORWARDED_FOR
HTTP_COOKIE
HTTP_USER_AGENT

More may be added later.

This changes ensures that middleware which work on the client IP aren't flumuxed
by its absense, and also makes it possible for previews to be rendered as the
logged in user (they had previously been rendered using an AnnonymousUser).

Because the user's logged in state is now detectable in a Page previews, the
Wagtail userbar now hides itself explicitly during previews, rather than relying
on the fact that previews used to be built with AnonymousUser.
2016-07-06 20:28:05 +01:00
Vincent Audebert
14919f3b41 Possibility to delete a user #2371
As mentioned in the comments I didn't see the first pull request (https://github.com/torchbox/wagtail/pull/2509)
However, I think my changes were a tiny bit more complete in terms of UI/UX. I allow to delete a user directly from the user list + you can delete any user if you are superuser, except yourself. This way we are sure to keep at least one superuser but we can still delete superusers.
I added some tests from this PR to my code and also added the permission denied on the delete page.
2016-07-06 17:05:17 +01:00
Mikalai Radchuk
0b29ba80db Makes notes for settings module more visible (#2826) 2016-07-06 19:01:09 +03:00
Mikalai Radchuk
b79069b247 Release notes for #2786 2016-07-06 17:44:57 +03: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
Karl Hobley
098433a724 Restructure API v2 module (as per RFC 8) (#2649)
* Moved api/apps.py into api/v2/apps.py

You now must add ``wagtail.api.v2`` instead of ``wagtail.api`` into ``INSTALLED_APPS``

* Restructure API v2 module

Images and documents endpoints are now defined in their respective apps
2016-07-06 15:57:09 +03:00
Karl Hobley
60003da430 Fix typos in 1.3 release notes 2016-07-05 15:00:32 +01:00
Matt Westcott
2b04ff9ba7 update JadeFormPage migration with new help text 2016-07-05 14:18:40 +01:00
Serafeim Papastefanos
16953c79f3 Allow multiple, comma seperated email addresses...
to be used in the `to_address field` in the `AbstractEmailForm`.
2016-07-05 13:02:57 +01: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
Janneke Janssen
9f72e12159 Inherit relevant border-radius from the parent 2016-07-04 21:34:12 +01:00
Janneke Janssen
9b6cdf41f4 Target the footer in the submenu to be absolute. Fixed throws collision with submenu transform 2016-07-04 21:24:08 +01:00
Josh Schneier
1dad100695 Add a check that the declared search_fields exist 2016-07-04 20:58:30 +01:00
Karl Hobley
f1913bd748 Make sure the default search backend is always defined
It's common in Wagtail to want to quickly override the base search settings to disable Elasticsearch in specific environments (eg CI or running imports).

To do this, you have to manually write out Wagtail's default search configuration.

This commit changes the way the default configuration is loaded, it is now loaded whenever there is no "default" backend configured rather than only loading if the ``WAGTAILSEARCH_BACKENDS`` was not defined at all.

To override a parent settings file's search backends configuration, you can now just do:

WAGTAILSEARCH_BACKENDS = {}

And the defaults will be restored
2016-07-04 20:40:57 +01:00
Matt Westcott
4a1b103558 Make elasticsearch-specific tests from wagtailimages / wagtaildocs run under tox 2016-07-04 20:32:31 +01:00
Karl Hobley
c38b2ace33 Fix tests that are checking issue #613
These tests haven't been run for a while due to a mistake in tox.ini. They are currently broken on master.

They broke because they require AUTO_UPDATE to be True for the Elasticsearch backend, but we recently disabled that to improve speed and reliability of the entire test suite. This commit adds a way for the tests that need AUTO_UPDATE to force it to be enabled on specific backends
2016-07-04 20:22:56 +01:00
Matt Westcott
f014332a52 Add Thibaud Colas to contributors 2016-06-30 19:13:20 +01:00
Thibaud Colas
1abb917ab8 Fix URL under package version badge (#2806)
crate.io has been shut down and the domain repurposed/sold. See https://www.reddit.com/r/Python/comments/1wcp93/what_happened_to_crateio/
2016-06-30 19:12:02 +01:00
Mikalai Radchuk
520d34f6d8 Add Tim Graham to the contributors list 2016-06-29 13:02:09 +03:00
Matt Westcott
03d8e738de Disallow CI failures on Django 1.10
Also prune a few Django 1.8 test environments, as a first step to phasing out Dj1.8 support
2016-06-28 16:44:20 +01:00
Matt Westcott
bdbc1b0c5b Release note for Django 1.10 compatibility 2016-06-28 16:34:46 +01:00
Paul J Stevens
daf7dee0d4 update django requirement 2016-06-28 16:26:00 +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
Paul J Stevens
ef05d37686 replace removed private API in favor of public API 2016-06-28 14:45:20 +01:00
Matt Westcott
810952cfc8 Add test for linked_objects being output when deletion is disallowed
Required as a prerequisite for making this code Django-1.10 compatible,
as per https://github.com/torchbox/wagtail/issues/2723#issuecomment-227241446
2016-06-28 14:43:26 +01:00
Paul J Stevens
865841eedf update test to handle django-1.10 change in FileField storage 2016-06-28 12:22:43 +01:00
Matt Westcott
3e38bab785 fix typo in Raphael Stolt's name 2016-06-27 18:27:46 +01:00
Matt Westcott
bf912b2aa9 Add Raphael Stolz to contributors 2016-06-27 17:37:22 +01:00