jp (output): template output first draft:
template output use the new template renderer and data_objects module in backend tools.
Options can be specified: template to give a direct path to template, browser to display result directly, inline-css to include css in the HTML page.
Default template can be specified in command's TEMPLATE attribute, and a template_data_mapping method is called if it exists to map data to what is expected by the template.
This commit is contained in:
parent
c4c57e7d42
commit
8579722d09
1 changed files with 118 additions and 7 deletions
|
|
@ -22,13 +22,13 @@ from sat_frontends.quick_frontend import constants
|
|||
|
||||
class Const(constants.Const):
|
||||
|
||||
APP_NAME = "jp"
|
||||
PLUGIN_CMD = "commands"
|
||||
PLUGIN_OUTPUT = "outputs"
|
||||
OUTPUT_TEXT = 'text' # blob of unicode text
|
||||
OUTPUT_DICT = 'dict' # simple key/value dictionary
|
||||
OUTPUT_LIST = 'list'
|
||||
OUTPUT_COMPLEX = 'complex' # complex data (e.g. multi-level dictionary)
|
||||
APP_NAME = u"jp"
|
||||
PLUGIN_CMD = u"commands"
|
||||
PLUGIN_OUTPUT = u"outputs"
|
||||
OUTPUT_TEXT = u'text' # blob of unicode text
|
||||
OUTPUT_DICT = u'dict' # simple key/value dictionary
|
||||
OUTPUT_LIST = u'list'
|
||||
OUTPUT_COMPLEX = u'complex' # complex data (e.g. multi-level dictionary)
|
||||
OUTPUT_TYPES = (OUTPUT_TEXT, OUTPUT_DICT, OUTPUT_LIST, OUTPUT_COMPLEX)
|
||||
|
||||
# exit codes
|
||||
|
|
|
|||
Loading…
Reference in a new issue