Package bosco :: Module formatter :: Class MakoRankingFormatter
[hide private]
[frames] | no frames]

Class MakoRankingFormatter

source code

          object --+        
                   |        
   AbstractFormatter --+    
                       |    
AbstractRankingFormatter --+
                           |
                          MakoRankingFormatter

Uses the Mako Templating Engine to format a ranking as HTML.

Instance Methods [hide private]
 
__init__(self, rankings, header, template_file, template_dir)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__str__(self)
Returns: Formatted Ranking
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]

Inherited from AbstractFormatter: validation_codes

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, rankings, header, template_file, template_dir)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • template_file - File name for the template
  • template_dir - template directory (inside the bosco module)
  • header (dict) - gerneral information for the ranking header
  • rankings (list of dicts with keys 'ranking' and 'info' the value of the 'ranking' key is an object of class Ranking)
Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

str(x)

Returns:
Formatted Ranking
Overrides: object.__str__
(inherited documentation)