Mercurial > libervia-backend
comparison frontends/src/jp/constants.py @ 2163:75667727c500
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.
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 21 Feb 2017 21:01:40 +0100 |
parents | 8f96c242fa89 |
children | d823a0cdbcc2 |
comparison
equal
deleted
inserted
replaced
2162:c9a67eb5bf72 | 2163:75667727c500 |
---|---|
20 from sat_frontends.quick_frontend import constants | 20 from sat_frontends.quick_frontend import constants |
21 | 21 |
22 | 22 |
23 class Const(constants.Const): | 23 class Const(constants.Const): |
24 | 24 |
25 APP_NAME = "jp" | 25 APP_NAME = u"jp" |
26 PLUGIN_CMD = "commands" | 26 PLUGIN_CMD = u"commands" |
27 PLUGIN_OUTPUT = "outputs" | 27 PLUGIN_OUTPUT = u"outputs" |
28 OUTPUT_TEXT = 'text' # blob of unicode text | 28 OUTPUT_TEXT = u'text' # blob of unicode text |
29 OUTPUT_DICT = 'dict' # simple key/value dictionary | 29 OUTPUT_DICT = u'dict' # simple key/value dictionary |
30 OUTPUT_LIST = 'list' | 30 OUTPUT_LIST = u'list' |
31 OUTPUT_COMPLEX = 'complex' # complex data (e.g. multi-level dictionary) | 31 OUTPUT_COMPLEX = u'complex' # complex data (e.g. multi-level dictionary) |
32 OUTPUT_TYPES = (OUTPUT_TEXT, OUTPUT_DICT, OUTPUT_LIST, OUTPUT_COMPLEX) | 32 OUTPUT_TYPES = (OUTPUT_TEXT, OUTPUT_DICT, OUTPUT_LIST, OUTPUT_COMPLEX) |
33 | 33 |
34 # exit codes | 34 # exit codes |
35 EXIT_OK = 0 | 35 EXIT_OK = 0 |
36 EXIT_ERROR = 1 # generic error, when nothing else match | 36 EXIT_ERROR = 1 # generic error, when nothing else match |