galaxy.web.framework.helpers package
Galaxy web framework helpers
The functions in this module should be considered part of the API used by visualizations in their mako files through the $h object, see GalaxyWebTransaction in galaxy/webapps/base/webapp.py
- galaxy.web.framework.helpers.truncate(content, length=100, suffix='...')[source]
Smart string truncation
- galaxy.web.framework.helpers.css(*args)[source]
Take a list of stylesheet names (no extension) and return appropriate string of link tags.
Cache-bust with time that server started running on
- galaxy.web.framework.helpers.dist_css(*args)[source]
Transition function ‘css’ helper – this is the modern way where all bundled artifacts are in the unified ‘dist’.
- galaxy.web.framework.helpers.js_helper(prefix, *args)[source]
Take a prefix and list of javascript names and return appropriate string of script tags.
Cache-bust with time that server started running on
- galaxy.web.framework.helpers.dist_js(*args)[source]
Take a prefix and list of javascript names and return appropriate string of script tags.
- galaxy.web.framework.helpers.is_true(val)[source]
Returns true if input is a boolean and true or is a string and looks like a true value.
- galaxy.web.framework.helpers.to_js_bool(val)[source]
Prints javascript boolean for passed value. TODO: isn’t there a standard python JSON parser we should be using instead of all these manual conversions?
- galaxy.web.framework.helpers.js_nullable(val)[source]
Prints javascript null instead of python None TODO: isn’t there a standard python JSON parser we should be using instead of all these manual conversions?