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

Make ReverseManyToOneDescriptor generic over a model #2227

Merged

Conversation

flaeppe
Copy link
Member

@flaeppe flaeppe commented Jun 21, 2024

This allows us to remove some plugin code, as we now can fall back to the default related manager on the descriptor instead of having to implement the fallback behaviour manually.

Related issues

Refs: #2214 (comment)

flaeppe added 2 commits June 21, 2024 14:51
This allows us to remove some plugin code, as we now can fall back to
the default related manager on the descriptor instead of having to
implement the fallback behaviour manually.
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.

Should we add this to ext to be monkeypatched? Or is it an internal tool only?

@flaeppe
Copy link
Member Author

flaeppe commented Jun 21, 2024

Good point, we should patch ReverseManyToOneDescriptor with __class_getitem__

@flaeppe flaeppe merged commit c693e2a into typeddjango:master Jun 21, 2024
36 checks passed
@flaeppe flaeppe deleted the fix/generic-reverse-many-to-one-descriptor branch June 21, 2024 14:37
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