Public Member Functions | Private Member Functions | Private Attributes
tornado.web.TemplateModule Class Reference
Inheritance diagram for tornado.web.TemplateModule:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

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.

Definition at line 2671 of file web.py.


Constructor & Destructor Documentation

def tornado.web.TemplateModule.__init__ (   self,
  handler 
)

Reimplemented from tornado.web.UIModule.

Definition at line 2686 of file web.py.


Member Function Documentation

def tornado.web.TemplateModule._get_resources (   self,
  key 
) [private]

Definition at line 2705 of file web.py.

Returns a list of CSS files required by this module.

Reimplemented from tornado.web.UIModule.

Definition at line 2723 of file web.py.

Returns a CSS string that will be embedded in the page.

Reimplemented from tornado.web.UIModule.

Definition at line 2720 of file web.py.

Returns a JavaScript string that will be embedded in the page.

Reimplemented from tornado.web.UIModule.

Definition at line 2708 of file web.py.

Returns an HTML string that will be put in the <body/> element

Reimplemented from tornado.web.UIModule.

Definition at line 2735 of file web.py.

Returns a CSS string that will be put in the <head/> element

Reimplemented from tornado.web.UIModule.

Definition at line 2732 of file web.py.

Returns a list of JavaScript files required by this module.

Reimplemented from tornado.web.UIModule.

Definition at line 2711 of file web.py.

def tornado.web.TemplateModule.render (   self,
  args,
  kwargs 
)
Overridden in subclasses to return this module's output.

Reimplemented from tornado.web.UIModule.

Definition at line 2692 of file web.py.


Member Data Documentation

Definition at line 2686 of file web.py.

Definition at line 2686 of file web.py.


The documentation for this class was generated from the following file:


rosbridge_server
Author(s): Jonathan Mace
autogenerated on Wed Sep 13 2017 03:18:21