Home | Trees | Indices | Help |
|
---|
|
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 --+ | CustomRenderer
A renderer defined in a python module.
To define a custom renderer write a python module and define a class MainPage inheriting from gavo.web.ServiceBasedPage.
This class basically is a nevow resource, i.e., you can define docFactory, locateChild, renderHTTP, and so on.
To use it, you have to define a service with the resdir-relative path to the module in the customPage attribute and probably a nullCore. You also have to allow the custom renderer (but you may have other renderers, e.g., static).
If the custom page is for display in web browsers, define a class method isBrowseable(cls, service) returning true. This is for the generation of links like "use this service from your browser" only; it does not change the service's behaviour with your renderer.
There should really be a bit more docs on this, but alas, there's none as yet.
Instance Methods | |||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
Class Methods | |||
|
|||
Inherited from |
Class Variables | |
name =
hash(x) |
|
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
Properties | |
Inherited from |
Method Details |
x.__init__(...) initializes x; see help(type(x)) for signature
|
|
|
Locate a child page of this one. ctx is a nevow.context.PageContext representing the parent Page, and segments is a tuple of each element in the URI. An tuple (page, segments) should be returned, where page is an instance of nevow.rend.Page and segments a tuple representing the remaining segments of the URI. If the child is not found, return NotFound instead. locateChild is designed to be easily overridden to perform fancy lookup tricks. However, the default locateChild is useful, and looks for children in three places, in this order:
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |