Package gavo :: Package web :: Module common :: Class CommonRenderers
[frames] | no frames]

Class CommonRenderers

source code

object --+
         |
        CommonRenderers
Known Subclasses:

A base for renderer (python) mixins within the DC.

Including standard stylesheets/js/whatever: <head n:render="commonhead">...</head>

Rendering internal links (important for off-root operation):

* <tag href|src="/foo" n:render="rootlink"/>

Instance Methods
 
render_unicode(self, ctx, data)
returns unicode(data); use this when render="string" might have to format non-ASCII.
source code
 
render_rootlink(self, ctx, data) source code
 
render_commonhead(self, ctx, data) source code
 
render_urlescape(self, ctx, data)
renders data as a url-escaped string.
source code
 
render_getconfig(self, ctx, data)
looks up the text child in the DaCHS configuration and inserts the value as a (unicode) string.
source code
 
__providedBy__(...)
Object Specification Descriptor
source code
 
__provides__(...)
Special descriptor for class __provides__

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

Class Variables
  __implemented__ = <implementedBy gavo.web.common.CommonRenderers>
Properties

Inherited from object: __class__

Method Details

render_getconfig(self, ctx, data)

source code 

looks up the text child in the DaCHS configuration and inserts the value as a (unicode) string.

The config key is either [section]item or just item for something in [general]. Behaviour for undefined config items is undefined.

__provides__(...)

 

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.