-
Notifications
You must be signed in to change notification settings - Fork 0
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
CORE-3229: Forward signals from proxy models to their concrete models #10
CORE-3229: Forward signals from proxy models to their concrete models #10
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! Thank you for your contribution 💪
As it's your first contribution be sure to check out the patch review checklist.
If you're fixing a ticket from Trac make sure to set the "Has patch" flag and include a link to this PR in the ticket!
If you have any design or process questions then you can ask in the Django forum.
Welcome aboard ⛵️!
528f9fc
to
245ece1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but can we add unit tests to this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was told offline that unit tests will be added to the app 👍🏻
Right! We don't maintain the changes in this repo from a test perspective so I've put all the tests in this draft. |
Related feature request in django: https://code.djangoproject.com/ticket/9318 |
Forward signals from proxy models to their concrete models. Here's the draft that tests this change.
If you're questioning yourself about the
m2m_changed
signal, we don't need to do anything there because thesender
is the m2m relation which is the same whether we start from the proxy model (ProxyModel.m2m_field.through
) or the concrete model (ConcreteModel.m2m_field.through
).