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
Matt Westcott
dbdf0c3275
Add collection field to image form
2016-02-29 13:14:07 +00:00
Matt Westcott
7e6fa356c4
Make collection field logic on BaseDocumentForm reusable
2016-02-29 13:14:07 +00:00
Matt Westcott
94a187d635
Add test for wagtailimages add_multiple view
2016-02-29 13:14:06 +00:00
Matt Westcott
f71a66e0ea
Convert wagtailimages to use CollectionOwnershipPermissionPolicy
2016-02-29 13:14:06 +00:00
Matt Westcott
382cf37d99
Make Image model a collection member
2016-02-29 13:14:06 +00:00
Matt Westcott
e1072a5a56
Implement document permissions panel on group edit page
2016-02-29 13:14:06 +00:00
Matt Westcott
766e2501e4
Implement register_group_permission_panel hook for adding new panels to the group edit form
2016-02-29 13:14:05 +00:00
Matt Westcott
7f7a4be155
Add collection field to document form
2016-02-29 13:14:05 +00:00
Matt Westcott
d7d3d61e6a
Implement collections_user_has_any_permission_for / collections_user_has_permission_for methods on collection permission policies
2016-02-29 13:14:05 +00:00
Matt Westcott
f9adb78ae4
Switch wagtaildocs to use CollectionOwnershipPermissionPolicy
2016-02-29 13:14:05 +00:00
Matt Westcott
abab314851
Move operation to fix collation on Collection.path to a separate migration
...
This ensures that it won't get missed when migrating sites from the custom 1.3-collections fork, which didn't have this fix in place.
2016-02-29 13:14:05 +00:00
Matt Westcott
f47636c119
Implement CollectionOwnershipPermissionPolicy
2016-02-29 13:14:04 +00:00
Matt Westcott
086c9b0b1a
Implement CollectionPermissionPolicy
2016-02-29 13:14:04 +00:00
Matt Westcott
78bfcd1757
Move wagtail.wagtailcore.permission_policies into a subpackage
2016-02-29 13:14:04 +00:00
Matt Westcott
027c107df3
Add migration to copy global document permissions to the default collection
2016-02-29 13:14:04 +00:00
Matt Westcott
34c5582fa0
Add group collection permission model
2016-02-29 13:14:04 +00:00
Matt Westcott
a6b95930bb
Make Document a collection member model
2016-02-29 13:14:04 +00:00
Matt Westcott
e5a62eadda
Add collections settings menu item
2016-02-29 13:14:03 +00:00
Matt Westcott
a2239e9f4a
Prevent root node from being edited/deleted
2016-02-29 13:14:03 +00:00
Matt Westcott
bfe663a9ed
Implement collection admin views
2016-02-29 13:14:03 +00:00