kopia lustrzana https://github.com/wagtail/wagtail
rodzic
2be1da6621
commit
6f9dda5cfc
|
@ -16,6 +16,7 @@ Changelog
|
|||
* Remove `wagtail.unpublish` log action on aliases when source page is unpublished (Dan Braghis)
|
||||
* Fix: Ensure that StreamField's `FieldBlock`s correctly set the `required` and `aria-describedby` attributes (Storm Heg)
|
||||
* Fix: Avoid an error when the moderation panel (admin dashboard) contains both snippets and private pages (Matt Westcott)
|
||||
* Fix: When deleting collections, ensure the collection name is correctly shown in the success message (LB (Ben) Johnston)
|
||||
* Docs: Document `WAGTAILADMIN_BASE_URL` on "Integrating Wagtail into a Django project" page (Shreshth Srivastava)
|
||||
* Docs: Replace incorrect screenshot for authors listing on tutorial (Shreshth Srivastava)
|
||||
* Maintenance: Fix snippet search test to work on non-fallback database backends (Matt Westcott)
|
||||
|
|
|
@ -29,6 +29,7 @@ depth: 1
|
|||
|
||||
* Ensure that StreamField's `FieldBlock`s correctly set the `required` and `aria-describedby` attributes (Storm Heg)
|
||||
* Avoid an error when the moderation panel (admin dashboard) contains both snippets and private pages (Matt Westcott)
|
||||
* When deleting collections, ensure the collection name is correctly shown in the success message (LB (Ben) Johnston)
|
||||
|
||||
### Documentation
|
||||
|
||||
|
|
|
@ -600,6 +600,12 @@ class TestDeleteCollectionAsSuperuser(WagtailTestUtils, TestCase):
|
|||
# Should redirect back to index
|
||||
self.assertRedirects(response, reverse("wagtailadmin_collections:index"))
|
||||
|
||||
# Check the message content
|
||||
self.assertEqual(
|
||||
response.context["message"],
|
||||
"Collection 'Holiday snaps' deleted.",
|
||||
)
|
||||
|
||||
# Check that the collection was deleted
|
||||
with self.assertRaises(Collection.DoesNotExist):
|
||||
Collection.objects.get(id=self.collection.id)
|
||||
|
|
|
@ -182,6 +182,6 @@ class Delete(DeleteView):
|
|||
# collection is non-empty; refuse to delete it
|
||||
return HttpResponseForbidden()
|
||||
|
||||
messages.success(request, self.get_success_message())
|
||||
self.object.delete()
|
||||
messages.success(request, self.success_message.format(self.object))
|
||||
return redirect(self.index_url_name)
|
||||
|
|
Ładowanie…
Reference in New Issue