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

CORE-3229: Forward signals from proxy models to their concrete models #10

Conversation

danielfbnunes
Copy link

@danielfbnunes danielfbnunes commented Nov 6, 2023

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 the sender 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).

Copy link

@github-actions github-actions bot left a 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 ⛵️!

@danielfbnunes danielfbnunes force-pushed the daniel.nunes/CORE-3229-forward-signals-from-proxy-models-to-their-concrete-models branch from 528f9fc to 245ece1 Compare November 6, 2023 18:18
Copy link

@jimmyjiji jimmyjiji left a 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?

Copy link

@jimmyjiji jimmyjiji left a 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 👍🏻

@danielfbnunes
Copy link
Author

danielfbnunes commented Nov 6, 2023

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.

@danielfbnunes danielfbnunes merged commit 1db515f into patched_4.2.6 Nov 7, 2023
2 of 6 checks passed
@danielfbnunes danielfbnunes deleted the daniel.nunes/CORE-3229-forward-signals-from-proxy-models-to-their-concrete-models branch November 7, 2023 10:06
@neykov
Copy link

neykov commented Mar 21, 2024

Related feature request in django: https://code.djangoproject.com/ticket/9318

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

Successfully merging this pull request may close these issues.

5 participants