Без опису
Ви не можете вибрати більше 25 тем Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718
  1. #-*- coding: utf-8 -*-
  2. import Lodel.settings
  3. from Lodel.hooks import LodelHook
  4. ## @brief Hook's callback example
  5. @LodelHook('leapi_get_pre')
  6. @LodelHook('leapi_get_post')
  7. @LodelHook('leapi_update_pre')
  8. @LodelHook('leapi_update_post')
  9. @LodelHook('leapi_delete_pre')
  10. @LodelHook('leapi_delete_post')
  11. @LodelHook('leapi_insert_pre')
  12. @LodelHook('leapi_insert_post')
  13. def dummy_callback(hook_name, caller, payload):
  14. if Lodel.settings.Settings.debug:
  15. print("\tHook %s\tcaller %s with %s" % (hook_name, caller, payload))
  16. return payload