Package gavo :: Package web :: Module constantrender :: Class FixedPageRenderer
[frames] | no frames]

Class FixedPageRenderer

source code

                                       object --+    
                                                |    
                        grend.CustomTemplateMixin --+
                                                    |
                   object --+                       |
                            |                       |
       nevow.rend.DataFactory --+                   |
                                |                   |
                   object --+   |                   |
                            |   |                   |
     nevow.rend.RenderFactory --+                   |
                                |                   |
                   object --+   |                   |
                            |   |                   |
      nevow.rend.MacroFactory --+                   |
                                |                   |
                   object --+   |                   |
                            |   |                   |
 nevow.rend.ConfigurableMixin --+                   |
                                |                   |
              nevow.rend.Fragment --+               |
                                    |               |
   nevow.rend.ConfigurableFactory --+               |
                                    |               |
nevow.rend.FreeformChildMixin --+   |               |
                                |   |               |
      nevow.rend.ChildLookupMixin --+               |
                                    |               |
                      nevow.rend.Page --+           |
                                        |           |
                       object --+       |           |
                                |       |           |
           common.CommonRenderers --+   |           |
                                    |   |           |
                grend.GavoRenderMixin --+           |
                                        |           |
                           grend.GavoPage --+       |
                                            |       |
                      grend.ResourceBasedPage --+   |
                                                |   |
                           grend.ServiceBasedPage --+
                                                    |
                                                   FixedPageRenderer
Known Subclasses:

A renderer that renders a single template.

Use something like <template key="fixed">res/ft.html</template> in the enclosing service to tell the fixed renderer where to get this template from.

In the template, you can fetch parameters from the URL using something like <n:invisible n:data="parameter FOO" n:render="string"/>; you can also define new render and data functions on the service using customRF and customDF.

This is, in particular, used for the data center's root page.

The fixed renderer is intended for non- or slowly changing content. It is annotated as cachable, which means that DaCHS will in general only render it once and then cache it. If the render functions change independently of the RD, use the volatile renderer.

Built-in services for such browser apps should go through the //run RD.

Instance Methods
 
__init__(self, ctx, service)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
render_voplotArea(self, ctx, data)
fills out the variable attributes of a voplot object with stuff from config.
source code
 
data_parameter(self, parName)
lets you insert an URL parameter into the template.
source code

Inherited from grend.CustomTemplateMixin: getDocFactory

Inherited from grend.ServiceBasedPage: __provides__, child, data_serviceURL, locateChild, processData, renderHTTP, renderer, runService, runServiceWithFormalData

Inherited from grend.ResourceBasedPage: data_rdId

Inherited from nevow.rend.Page: child_, flattenFactory, onPostFailure, onPostSuccess, rememberStuff, renderString, renderSynchronously, webFormPost

Inherited from nevow.rend.Fragment: get, remember, rend

Inherited from nevow.rend.DataFactory: __providedBy__

Inherited from nevow.rend.RenderFactory: render_data, render_mapping, render_sequence, render_string, render_xml

Inherited from nevow.rend.MacroFactory: macro

Inherited from nevow.rend.ConfigurableMixin: getBinding, getBindingNames, getDefault, postForm

Inherited from grend.GavoRenderMixin: data_meta, data_rd, render_authinfo, render_datameta, render_explodableMeta, render_ifadmin, render_ifdata, render_ifmeta, render_ifnodata, render_ifnoslot, render_ifownmeta, render_ifslot, render_intro, render_meta, render_metahtml, render_prependsite, render_withsidebar

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

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

Inherited from nevow.rend.ConfigurableFactory: configurable_, configurable_original, locateConfigurable

Inherited from nevow.rend.ChildLookupMixin: childFactory, putChild

Inherited from nevow.rend.FreeformChildMixin: child_freeform_hand

Class Methods
 
isCacheable(cls, segments, request)
should return true if the content rendered will only change when the associated RD changes.
source code
 
isBrowseable(self, service)
returns True if this renderer applied to service is usable using a plain web browser.
source code

Inherited from grend.ResourceBasedPage: makeAccessURL

Class Variables
  name = 'fixed'
hash(x)

Inherited from grend.CustomTemplateMixin: customTemplate

Inherited from grend.ServiceBasedPage: __implemented__, checkedRenderer, openRenderer

Inherited from grend.ResourceBasedPage: parameterStyle, preferredMethod, resultType, urlUse

Inherited from nevow.rend.Page: addSlash, afterRender, beforeRender, buffered

Inherited from nevow.rend.Fragment: original

Inherited from grend.GavoRenderMixin: macroPackage

Inherited from nevow.rend.ChildLookupMixin: children

Properties

Inherited from grend.CustomTemplateMixin: docFactory

Inherited from object: __class__

Method Details

__init__(self, ctx, service)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

data_parameter(self, parName)

source code 

lets you insert an URL parameter into the template.

Non-existing parameters are returned as an empty string.

isCacheable(cls, segments, request)
Class Method

source code 

should return true if the content rendered will only change when the associated RD changes.

request is a nevow request object. web.root.ArchiveService already makes sure that you only see GET request without arguments and without a user, so you do not need to check this.

Overrides: grend.ResourceBasedPage.isCacheable
(inherited documentation)

isBrowseable(self, service)
Class Method

source code 
returns True if this renderer applied to service is usable using a plain web browser.
Overrides: grend.ResourceBasedPage.isBrowseable
(inherited documentation)