Public Member Functions | |
def | __init__ |
def | css_files |
def | embedded_css |
def | embedded_javascript |
def | html_body |
def | html_head |
def | javascript_files |
def | render |
Private Member Functions | |
def | _get_resources |
Private Attributes | |
_resource_dict | |
_resource_list |
UIModule that simply renders the given template. {% module Template("foo.html") %} is similar to {% include "foo.html" %}, but the module version gets its own namespace (with kwargs passed to Template()) instead of inheriting the outer template's namespace. Templates rendered through this module also get access to UIModule's automatic javascript/css features. Simply call set_resources inside the template and give it keyword arguments corresponding to the methods on UIModule: {{ set_resources(js_files=static_url("my.js")) }} Note that these resources are output once per template file, not once per instantiation of the template, so they must not depend on any arguments to the template.
def rosbridge_tools.tornado.web.TemplateModule.__init__ | ( | self, | |
handler | |||
) |
Reimplemented from rosbridge_tools.tornado.web.UIModule.
def rosbridge_tools.tornado.web.TemplateModule._get_resources | ( | self, | |
key | |||
) | [private] |
Returns a list of CSS files required by this module.
Reimplemented from rosbridge_tools.tornado.web.UIModule.
Returns a CSS string that will be embedded in the page.
Reimplemented from rosbridge_tools.tornado.web.UIModule.
Returns a JavaScript string that will be embedded in the page.
Reimplemented from rosbridge_tools.tornado.web.UIModule.
Returns an HTML string that will be put in the <body/> element
Reimplemented from rosbridge_tools.tornado.web.UIModule.
Returns a CSS string that will be put in the <head/> element
Reimplemented from rosbridge_tools.tornado.web.UIModule.
Returns a list of JavaScript files required by this module.
Reimplemented from rosbridge_tools.tornado.web.UIModule.
def rosbridge_tools.tornado.web.TemplateModule.render | ( | self, | |
args, | |||
kwargs | |||
) |
Overridden in subclasses to return this module's output.
Reimplemented from rosbridge_tools.tornado.web.UIModule.