oshipka/vm_gen/templates/_hooks.py
2020-06-05 12:38:25 +02:00

110 lines
1.7 KiB
Python

def get_template_func(instance):
return None
def get_templ_ctx_func(instance):
rv = dict()
return rv
def get_func(model_view, uuid, serialized_args):
"""Should return a list of one element (or [None] if element is none) or None if you want default behaviour"""
return None
def post_get_func(instance):
return instance
def list_template_func(instances):
return None
def list_templ_ctx_func(instances):
rv = dict()
return rv
def list_func(model_view, serialized_args):
"""Should return a list elements or None if you want default behaviour"""
return None
def post_list_func(instances):
return instances
def create_template_func():
return None
def create_templ_ctx_func():
rv = dict()
return rv
def create_args_process_func(serialized_form):
return serialized_form
def create_should_func(serialized_form):
return True, ""
def create_post_add_func(instance):
pass
def create_post_commit_func(instance):
pass
def update_template_func(instance):
return None
def update_templ_ctx_func(instance):
rv = dict()
return rv
def update_args_process_func(serialized_form):
return serialized_form
def update_should_func(serialized_form):
return True, ""
def update_post_add_func(instance):
pass
def update_post_commit_func(instance):
pass
def delete_template_func(instance):
return None
def delete_templ_ctx_func(instance):
rv = dict()
return rv
def delete_args_process_func(serialized_form):
return serialized_form
def delete_should_func(instance, serialized_form):
return True, ""
def delete_post_delete_func(instance):
pass
def delete_post_commit_func(instance):
pass