Package tdi :: Module model_adapters :: Class RenderAdapter
[frames] | no frames]

Class RenderAdapter

source code

object --+
         |
        RenderAdapter

Regular Render-Adapter implementation

See Also: ModelAdapterInterface

Instance Methods

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

Class Methods
ModelAdapterInterface
for_prerender(cls, model, attr=None)
Create prerender adapter from model
source code
Static Methods
ModelAdapterInterface
__new__(cls, model, requiremethods=False, requirescopes=False)
Construct
source code
Class Variables
  __implements__ = [<class 'tdi.interfaces.ModelAdapterInterface'>]
Properties

Inherited from object: __class__

Method Details

__new__(cls, model, requiremethods=False, requirescopes=False)
Static Method

source code 
Construct
Parameters:
  • model (any) - User model
  • requiremethods (bool) - Require methods to exist?
  • requirescopes (bool) - Require scopes to exist?
Returns: ModelAdapterInterface
Render adapter
Overrides: object.__new__

for_prerender(cls, model, attr=None)
Class Method

source code 
Create prerender adapter from model
Parameters:
  • model (any) - User model
  • attr (dict) - Attribute name mapping. The keys 'scope' and 'tdi' are recognized. If omitted or None, the default attribute names are applied ('tdi:scope' and 'tdi').
Returns: ModelAdapterInterface
Prerender adapter

Class Variable Details

__implements__

Value:
[<class 'tdi.interfaces.ModelAdapterInterface'>]