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

after_load, before_save and after_save #12

Open
lietu opened this issue Dec 9, 2020 · 1 comment
Open

after_load, before_save and after_save #12

lietu opened this issue Dec 9, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@lietu
Copy link
Contributor

lietu commented Dec 9, 2020

Would be nice to get a couple of hook functions, to automatically run things before or after saving is complete, and if possible they should get list of changed fields or at least if the model is new or not as an argument.

@joakimnordling joakimnordling added the enhancement New feature or request label Mar 31, 2021
@lietu lietu changed the title before_save and after_save after_load, before_save and after_save Oct 5, 2023
@steveobd
Copy link

I'm in the process of wrapping this library to make it more NDB-like. Guido did a lot of things right with it so perhaps look for inspriation https://github.com/googleapis/python-ndb/blob/982f8a70dfa4b940c162ce327441099aca982d21/google/cloud/ndb/model.py#L6226

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants