Browse Source

The format for giving custom modules to import in templates is documented

Roland Haroutiounian 8 years ago
parent
commit
f46e91f6d3
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      Template/Loader.py

+ 3
- 1
Template/Loader.py View File

@@ -21,7 +21,9 @@ class TemplateLoader(object):
21 21
     # @param template_file str : path to the template file (starting from the base path used to instanciate the
22 22
     #                            TemplateLoader)
23 23
     # @param template_vars dict : parameters to be used in the template
24
-    # @param template_extra list : list of custom modules to import in the template (default value : None)
24
+    # @param template_extra list : list of tuples indicating the custom modules to import in the template (default: None).
25
+    #                              The modules are given as tuples with the format : ('name_to_use_in_the_template', module)
26
+    #
25 27
     # @return str. String containing the HTML output of the processed templated
26 28
     def render_to_html(self, template_file, template_vars={}, template_extra=None):
27 29
         loader = jinja2.FileSystemLoader(searchpath=self.search_path, followlinks=self.follow_links)

Loading…
Cancel
Save