-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add @admin.action
and @admin.display
#47
Comments
adamchainz
changed the title
Add admin.action and admin.display
Add Sep 13, 2022
@admin.action
and @admin.display
This was referenced Sep 13, 2022
@ngnpope check it out 😎 |
Amazing! 🌟 Noticed one thing: This should also work for |
Ah, nicely spotted. I've also added that to the tasks for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Python Version
No response
Django Version
No response
Package Version
No response
Description
Find functions with appropriate attributes being set and rewrite them to use
@admin.action
or@admin.display
respectivelyhttps://docs.djangoproject.com/en/3.2/ref/contrib/admin/actions/#django.contrib.admin.action
https://docs.djangoproject.com/en/3.2/ref/contrib/admin/#django.contrib.admin.display
This is going to be a little tricky to do as multiple AST nodes will need inspecting and rewriting at once, if they all match.
We might need to visit class definitions and modules, and check all the function definitions within each + following assignments to figure out everything.
Steps:
The text was updated successfully, but these errors were encountered: