Override save, put, get, etc… methods in Google App Engine

后端 未结 3 844
情歌与酒
情歌与酒 2020-12-14 12:59

Is it possible to override methids for db.Model in Google App Engine? I want to declare beforeSave, afterSave methods, etc.. to create automatic tagging system.

I kn

3条回答
  •  南笙
    南笙 (楼主)
    2020-12-14 13:50

    I posted an extension to jbochi's HookedModel class so that the before_put and after_put methods are correctly invoked when called from db.put() and the _async family of functions.

    See AppEngine PreCall API hooks

提交回复
热议问题