Package gavo :: Package web :: Module grend :: Class GavoRenderMixin
[frames] | no frames]

Class GavoRenderMixin

source code

            object --+    
                     |    
common.CommonRenderers --+
                         |
                        GavoRenderMixin
Known Subclasses:

A mixin with renderers useful throughout the data center.

Rendering of meta information:

Rendering the sidebar -- <body n:render="withsidebar">. This will only work if the renderer has a service attribute that's enough of a service (i.e., carries meta and knows how to generate URLs).

Conditional rendering:

Obtaining system info

Instance Methods
 
data_meta(self, metaKey)
returns the value for the meta key metaName on this service.
source code
 
render_meta(self, ctx, data)
replaces a meta key with a plain text rendering of the metadata in the service.
source code
 
render_metahtml(self, ctx, data)
replaces a meta key with an html rendering of the metadata in the serivce.
source code
 
render_datameta(self, ctx, data)
replaces the meta key in the contents with the corresponding meta key's HTML rendering.
source code
 
render_ifmeta(self, metaName, propagate=True)
renders its children if there is metadata for metaName.
source code
 
render_ifownmeta(self, metaName)
renders its children if there is metadata for metaName in the service itself.
source code
 
render_ifdata(self, ctx, data) source code
 
render_ifnodata(self, ctx, data) source code
 
render_ifslot(self, slotName)
renders the children for slotName is present and true.
source code
 
render_ifnoslot(self, slotName)
renders if slotName is missing or not true.
source code
 
render_ifadmin(self, ctx, data) source code
 
render_explodableMeta(self, ctx, data) source code
 
render_intro(self, ctx, data)
returns something suitable for inclusion above the form.
source code
 
render_authinfo(self, ctx, data) source code
 
render_prependsite(self, ctx, data)
prepends a site id to the body.
source code
 
render_withsidebar(self, ctx, data) source code
 
data_rd(self, rdId)
returns the RD referenced in the body (or None if the RD is not there)
source code
 
__provides__(...)
Special descriptor for class __provides__

Inherited from common.CommonRenderers: __providedBy__, render_commonhead, render_getconfig, render_rootlink, render_unicode, render_urlescape

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

Class Variables
  macroPackage = None
hash(x)
  __implemented__ = <implementedBy gavo.web.grend.GavoRenderMixin>
Properties

Inherited from object: __class__

Method Details

render_ifslot(self, slotName)

source code 

renders the children for slotName is present and true.

This will not work properly if the slot values come from a deferred.

render_ifnoslot(self, slotName)

source code 

renders if slotName is missing or not true.

This will not work properly if the slot values come from a deferred.

render_intro(self, ctx, data)

source code 

returns something suitable for inclusion above the form.

The renderer tries, in sequence, to retrieve a meta called _intro, the description meta, or nothing.

render_prependsite(self, ctx, data)

source code 

prepends a site id to the body.

This is intended for titles and similar; it puts the string in [web]sitename in front of anything that already is in ctx.tag.

__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.

Overrides: common.CommonRenderers.__provides__