Package tdi :: Package tools :: Module template :: Class Layout
[frames] | no frames]

Class Layout

source code

object --+
         |
        Layout

Create template lists based on a start configuration
Instance Methods
 
__init__(self, loader, *base, **kwargs)
Initialization
source code
Layout
extend(self, *base, **kwargs)
Extend the layout and create a new one.
source code
TemplateList
__call__(self, *names, **kwargs)
Create a template list from this layout
source code

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

Properties

Inherited from object: __class__

Method Details

__init__(self, loader, *base, **kwargs)
(Constructor)

source code 
Initialization
Parameters:
  • loader (Loader) - Template loader
  • base (tuple) - Base template list
  • kwargs (dict) - Keywords
  • use (dict) - extra overlay -> filename mapping
  • ignore (iterable) - template names to ignore
  • cls (callable) - template list factory. If omitted or None, TemplateList is used.
  • lazy (bool) - Lazy loading?
Overrides: object.__init__

extend(self, *base, **kwargs)

source code 
Extend the layout and create a new one.
Parameters:
  • base (tuple) - Base template list
  • kwargs (dict) - Keywords
  • use (dict) - extra overlay -> filename mapping
  • ignore (iterable) - template names to ignore
  • consider (iterable) - Template names to "unignore"
Returns: Layout
New layout

__call__(self, *names, **kwargs)
(Call operator)

source code 
Create a template list from this layout
Parameters:
  • names (tuple) - Base template list
  • kwargs (dict) - Keywords
  • use (dict) - extra overlay -> filename mapping
  • ignore (iterable) - template names to ignore
  • consider (iterable) - Template names to "unignore"
Returns: TemplateList
template list