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

[Feature] Subscribe to changes of a given field/fields #181

Open
hishnash opened this issue Jun 15, 2023 · 0 comments
Open

[Feature] Subscribe to changes of a given field/fields #181

hishnash opened this issue Jun 15, 2023 · 0 comments

Comments

@hishnash
Copy link
Member

hishnash commented Jun 15, 2023

In some situations we only want to subscribe to changes of a given field on our models. And do not what to get a load of notifications for other fields.

Describe the solution you'd like

In the django signal we should be able to extract the set of dirty fields on save of the model. This can be used to build a dynamic set of group names.

We can then expose a subscribe to field method were consumers can add subscription to fields so that they are notified when given fields change.

Such field change groups would be appended to the groups emitted by the the groups for consumer a groups for signal methods so that users could still use the current filtering method in conjunction with field observation.

We would need a new @ModelFieldObserver() with some way to declare what fields to automatically generation groups for.

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

No branches or pull requests

1 participant