# access the display. If the X server is started by a different user # and www-data (usally the apache user) cannot access display, try # modifiying DISPLAY permisions by executing "xhost +" application.CONFIG["DISPLAY"] = ":0" # This is the most common # configuration # We extend the minimum WebTreeApplication with our own WSGI # application #application.set_external_app_handler(example_app) # Lets now apply our custom tree loader function to the main # application application.set_tree_loader(my_tree_loader) # And our layout as the default one to render trees application.set_default_layout_fn(codeml_clean_layout) # No img properties at start application.set_img_properties(None) # I want to make up how tree image in shown using a custrom tree # renderer that adds much more HTML code application.set_external_tree_renderer(tree_renderer) # ============================================================================== # ADD CUSTOM ACTIONS TO THE APPLICATION # # The function "register_action" allows to attach functionality to # nodes in the image. All registered accions will be shown in the # popup menu bound to the nodes and faces in the web image. #
# access the display. If the X server is started by a different user # and www-data (usally the apache user) cannot access display, try # modifiying DISPLAY permisions by executing "xhost +" application.CONFIG["DISPLAY"] = ":0" # This is the most common # configuration # We extend the minimum WebTreeApplication with our own WSGI # application application.set_external_app_handler(example_app) # Lets now apply our custom tree loader function to the main # application application.set_tree_loader(my_tree_loader) # And our layout as the default one to render trees application.set_default_layout_fn(main_layout) # I want to make up how tree image in shown using a custrom tree # renderer that adds much more HTML code application.set_external_tree_renderer(tree_renderer) # ============================================================================== # ADD CUSTOM ACTIONS TO THE APPLICATION # # The function "register_action" allows to attach functionality to # nodes in the image. All registered accions will be shown in the # popup menu bound to the nodes and faces in the web image. # # # register_action(action_name, target_type=["node"|"face"|"layout"|"search"], \