code: def action(*args, **kwargs):
      
      def decorator(f):
          return ActionFunction(f, *args, **kwargs)
      return decorator
docs: Transforms functions or class methods into actions.
      Optionnaly, you can define a function to be used as the view initializer:
  
          @action()
          def my_action():
              pass
  
          @my_action.init_view
          def my_action_init_view(view, options):
              pass