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

5830 Commits

Author SHA1 Message Date
Karl Hobley
c2045ccd79 Made image tags a meta field 2016-03-01 13:12:24 +00:00
Karl Hobley
364115fb1e Made "meta" configurable and moved some page fields into it 2016-03-01 13:12:24 +00:00
Karl Hobley
10c65d6881 Refactor meta serialisation
This is preparation for implementing better customisation of the meta section (allowing user fields to be added here).

All meta field classes have been broken down into parts. So DocumentMetaField/PageMetaField/etc have been broken down to TypeField, DetailUrlField, etc.

I have made the following public-facing changes to the API along the way:
 - page "parent" field has moved into meta
 - page "parent" is always present now, it will be serialised to null on homepages instead of disappearing
 - Child relations now have id and meta
2016-03-01 13:12:24 +00:00
Karl Hobley
3cc0662d42 Revert "feat(api/2): Removed meta from top of listings"
This reverts commit fb61033d9ffc5f460a3fa3704a8b13350b25dd03.
2016-03-01 13:12:24 +00:00
Karl Hobley
858e97d95d Renamed "results" to "items" 2016-03-01 13:12:24 +00:00
Karl Hobley
c09059cc44 Disable html_url if wagtail serve view is not registered 2016-03-01 13:12:24 +00:00
Michael Fillier
b391cbfd62 Added 'operator' to the API 2016-03-01 13:12:24 +00:00
Karl Hobley
b4e6229b37 feat(api/2): Added some more default fields to the pages endpoint 2016-03-01 13:12:24 +00:00
Karl Hobley
40de7d9090 feat(api/2): Allow multiple page types to be specified in type filter 2016-03-01 13:12:24 +00:00
Karl Hobley
30ec65fc13 feat(api/2): Show all available fields by default 2016-03-01 13:12:24 +00:00
Karl Hobley
4fb09ad7ca feat(api/2): Renamed results list to "results" 2016-03-01 13:12:24 +00:00
Karl Hobley
0c9951928f feat(api/2): Removed meta from top of listings 2016-03-01 13:12:24 +00:00
Karl Hobley
ada810cce3 cleanup(api/2): No longer need "show_details" 2016-03-01 13:12:24 +00:00
Karl Hobley
7d24d56493 feat(api/2): Make document download_url available in listings 2016-03-01 13:12:24 +00:00
Karl Hobley
6d06aa4ef5 feat(api/2): Add "html_url" to page meta 2016-03-01 13:12:24 +00:00
Karl Hobley
b832672811 feat(api/2): Added new module for WagtailAPI v2 2016-03-01 13:12:24 +00:00
Karl Hobley
e3504af94c feat(api): Added wagtail.api module 2016-03-01 13:12:24 +00:00
Karl Hobley
dc3910a613 Changelog/release note/contributor for #2279 2016-03-01 12:32:09 +00:00
Kaitlyn Crawford
8c8584922e removed restriction to only search on title field 2016-03-01 12:29:47 +00:00
Matt Westcott
6bae4f04ca Enable template debugging on tests, to catch broken includes 2016-03-01 12:23:53 +00:00
Karl Hobley
182d847b3f Changelog and release note for #2027 2016-03-01 12:14:49 +00:00
Matt Westcott
7861c2b492 Add get_site and get_url_parts to the Page model reference docs 2016-03-01 12:11:14 +00:00
Matt Westcott
4dff225d83 Add tests for get_url_parts 2016-03-01 12:11:14 +00:00
Matt Westcott
b4bde8cbb3 Explicitly check for get_url_parts returning None
This ensures that unrelated TypeErrors don't get buried.
2016-03-01 12:11:14 +00:00
Matt Westcott
b4f9931529 Move shared URL-building logic into a get_url_parts method, and implement Page.get_site
Fixes #693
2016-03-01 12:11:14 +00:00
Matt Westcott
6851bbf1a6 Fix custom image docs to indicate that fields must be non-required 2016-03-01 12:07:35 +00:00
Matt Westcott
f249aba6ef fix flake8 error 2016-03-01 01:08:49 +00:00
Matt Westcott
c6548fea12 Release notes for #2278 / #2280 2016-02-29 18:16:50 +00:00
Matt Westcott
57f5126f90 Remove slug assignment from a bunch of tests that no longer need it 2016-02-29 17:28:36 +00:00
Matt Westcott
0c4cab8705 Auto-generate slug at the model level if none was specified 2016-02-29 17:28:36 +00:00
Matt Westcott
e24c993a4a Enforce slug uniqueness at the model level - fixes #1518 2016-02-29 17:28:36 +00:00
Matt Westcott
96f7944c6e Apply full_clean on save_revision and preview
This requires us to set fake (but realistic) values for 'path' and 'depth' during preview_on_create
in order to pass validation.
2016-02-29 17:28:36 +00:00
Matt Westcott
8efb7bd231 Perform full_clean on page save, and fix tests that previously saved invalid pages 2016-02-29 17:28:36 +00:00
Matt Westcott
7ed53087aa Update node.js version requirements 2016-02-29 15:55:02 +00:00
Matt Westcott
d1a86c06da documentation: now with 8.3% more underline 2016-02-29 15:03:28 +00:00
Matt Westcott
fc3936a229 Release note for #2243 (Collections) 2016-02-29 14:16:35 +00:00
Matt Westcott
3195a5200f Prevent deletion of collections that are non-empty
Since the collections infrastructure itself does not know about the object types that
can exist within collections, this requires a new hook `describe_collection_contents`
to allow collection contents to be discovered.
2016-02-29 13:14:10 +00:00
Matt Westcott
a10f56287c Check is_authenticated flag on _check_perm and instances_user_has_any_permission_for
This avoids making redundant queries on groups / permissions when user is anonymous.
2016-02-29 13:14:10 +00:00
Matt Westcott
49d232a356 Fix image / document search for non-superusers.
Since it's difficult for search() queries to traverse arbitrary relations, the
instances_user_has_any_permission_for methods in wagtailcore.permission_policies.collections
have been simplified to build the list of candidate collections in a separate query, and
filter the final queryset with a `collection__in` clause. This means that we just need to
index the 'collection' field of image / document in order for search to work again.
2016-02-29 13:14:10 +00:00
Matt Westcott
f0677525d9 Add collection field to multiple doc uploader 2016-02-29 13:14:10 +00:00
Matt Westcott
569178025c Add missing on_delete parameters to migrations 2016-02-29 13:14:10 +00:00
Matt Westcott
3042c10ec2 Add merge migrations to wagtailcore and wagtaildocs
We are not renumbering the collection migrations here, as some sites already exist
in the wild running a custom build of Wagtail 1.3 with collections, and we want
those to continue working.
2016-02-29 13:14:09 +00:00
Matt Westcott
ee2ef1da03 add collection selector to document chooser
Conflicts:
	wagtail/wagtaildocs/views/chooser.py
2016-02-29 13:14:09 +00:00
Matt Westcott
48a817f9c3 implement collection chooser on document listing 2016-02-29 13:14:09 +00:00
Matt Westcott
8466055e93 add collection selector to image chooser
Conflicts:
	wagtail/wagtailimages/templates/wagtailimages/chooser/chooser.js
	wagtail/wagtailimages/views/chooser.py

Conflicts:
	wagtail/wagtailimages/views/chooser.py
2016-02-29 13:14:09 +00:00
Matt Westcott
ba954f070f implement collection chooser on image listing 2016-02-29 13:14:08 +00:00
Matt Westcott
d8be1ae897 Remove submit button from document chooser.
It takes up valuable vertical space, and isn't needed because searches happen automatically
2016-02-29 13:14:08 +00:00
Matt Westcott
f4f5ae2b10 Remove search button from image chooser.
It takes up valuable vertical space, and isn't needed because searches happen automatically
2016-02-29 13:14:08 +00:00
Matt Westcott
649cb98687 Move shared collection permission formset logic to wagtailadmin; add images permission panel 2016-02-29 13:14:08 +00:00
Matt Westcott
57b4c03690 Add collection field to multiple image uploader 2016-02-29 13:14:07 +00:00