Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated insert_editor_css to insert_global_admin_css #218

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

jamesbiggs
Copy link
Contributor

This PR was made to satisfy the issue: #217

Updated the wagtail_hooks that contains a hook using insert_editor_css which is bringing in a RemovedInWagtail60Warning when upgrading to wagtail 5.1.
Changing this to use insert_global_admin_css will resolve the deprecation warning.

@@ -109,7 +109,7 @@ class MediaAdminURLFinder(ModelAdminURLFinder):
register_admin_url_finder(get_media_model(), MediaAdminURLFinder)


@hooks.register("insert_editor_css")
@hooks.register("insert_global_admin_css")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while I would've preferred a single hook implementation, this is good enough.

Note to self: got to do more clean up, and potentially drop this CSS file entirely -
https://github.com/torchbox/wagtailmedia/blob/main/src/wagtailmedia/static/wagtailmedia/css/wagtailmedia.css#L5-L13

@zerolab zerolab merged commit 8007157 into torchbox:main Aug 1, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants