Home | Trees | Indices | Help |
|
---|
|
object --+ | base.structure.StructureBase --+ | object --+ | | | base.common.Parser --+ | base.structure.ParseableStructure --+ | base.structure.Structure --+ | object --+ | | | base.structure.RestrictionMixin --+ | CustomPageFunction --+ | CustomDF
A custom data function for a service.
Custom data functions can be used to expose certain aspects of a service to Nevow templates. Thus, their definition usually only makes sense with custom templates, though you could, in principle, override built-in render functions.
In the data functions, you have the names ctx for nevow's context and data for whatever data the template passes to the renderer.
You can access the embedding service as service, the embedding RD as service.rd.
You can return arbitrary python objects -- whatever the render functions can deal with. You could, e.g., write:
<customDF name="now"> return datetime.datetime.utcnow() </customDF>
You also see a nevow context within the function. You can use that to access a query paramter ``order`` like this:
args = inevow.IRequest(ctx).args sortOrder = args.get("order", ["authors"])
Nested Classes | |
Inherited from |
Instance Methods | |
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
Class Methods | |
Inherited from |
Class Variables | |
name_ =
a sentinel for all kinds of undefined values. |
|
Inherited from Inherited from Inherited from |
Properties | |
Inherited from |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |