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

Allow any function for admin's display and action decorators #2210

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

flaeppe
Copy link
Member

@flaeppe flaeppe commented Jun 6, 2024

I realised that:

  • The display decorator isn't limited to any specific type of callable, it accepts anything really.
  • The action decorator was trying to dictate a callable type that the ModelAdmin.actions expects. But that's the responsibility of ModelAdmin. And action also accepts anything.

Refs:

I realised that:
- The `display` decorator isn't limited to any specific type of
  callable, it accepts anything really.
- The `action` decorator was trying to dictate a callable type that the
  `ModelAdmin.actions` expects. But that's the responsibility of
  `ModelAdmin`.
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Thanks!

@flaeppe flaeppe merged commit 2d05cfc into typeddjango:master Jun 6, 2024
36 checks passed
@flaeppe flaeppe deleted the fix/relax-admin-decorators branch June 6, 2024 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants