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

AdminChooser needs to be replaced with BaseChooser #189

Closed
Scotchester opened this issue Nov 21, 2022 · 4 comments
Closed

AdminChooser needs to be replaced with BaseChooser #189

Scotchester opened this issue Nov 21, 2022 · 4 comments

Comments

@Scotchester
Copy link
Collaborator

Scotchester commented Nov 21, 2022

When using the latest release with Wagtail 4, this warning is thrown:

usr/local/lib/python3.8/dist-packages/wagtail/admin/widgets/chooser.py:37: 
RemovedInWagtail50Warning: wagtail.admin.widgets.chooser.AdminChooser is deprecated.
Custom chooser subclasses should inherit from wagtail.admin.widgets.chooser.BaseChooser instead.

AdminChooser was replaced by BaseChooser in Wagtail 4.0, so wagtailmedia should be updated here:

class AdminMediaChooser(AdminChooser):

@zerolab
Copy link
Member

zerolab commented Nov 22, 2022

I believe there's more than that involved in making this happen, but that is the correct place.
PR(s) welcome

@nickmoreton
Copy link

I noticed that a failing test for wagtail-webstories is because of this import.

from wagtail.admin.widgets import AdminChooser

I'll have a better look around and put in a PR for it.

@nickmoreton
Copy link

I'll have a better look around and put in a PR for it.

I see what you mean @zerolab there's more to it. I don't have time for this at the moment 😞

@zerolab
Copy link
Member

zerolab commented Apr 23, 2023

Fixed in #199

@zerolab zerolab closed this as completed Apr 23, 2023
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

No branches or pull requests

3 participants