template list repair finished. template add small modified.add draw_code, get_template_preview method.