Class f.a.Typed(Attribute):

Part of formless.annotate View Source View In Hierarchy

Known subclasses: formless.annotate.Boolean, formless.annotate.Button, formless.annotate.Choice, formless.annotate.Compound, formless.annotate.Context, formless.annotate.Directory, formless.annotate.FileUpload, formless.annotate.Integer, formless.annotate.Method, formless.annotate.Object, formless.annotate.Real, formless.annotate.Request, formless.annotate.String

Implements interfaces: formless.iformless.ITyped

A typed value. Subclasses of Typed are constructed inside of TypedInterface class definitions to describe the types of properties, the parameter types to method calls, and method return types.
Instance VariableslabelThe short label which will describe this parameter/proerties purpose to the user.
descriptionA long description which further describes the sort of input the user is expected to provide.
defaultA default value that may be used as an initial value in the form.
requiredWhether the user is required to provide a value
nullThe value which will be produced if required is False and the user does not provide a value
unicodeIff true, try to determine the character encoding of the data from the browser and pass unicode strings to coerce.
Line # Kind Name Docs
109 Method __init__ Undocumented
137 Method getAttribute Undocumented
140 Method coerce Coerce the input 'val' from a string into a value suitable
def __init__(self, label=None, description=None, default=None, required=None, requiredFailMessage=None, null=None, unicode=None, **attributes): (source)
Undocumented
def getAttribute(self, name, default=None): (source)
Undocumented
def coerce(self, val, configurable): (source)

Coerce the input 'val' from a string into a value suitable for the type described by the implementor. If coercion fails, coerce should raise InputError with a suitable error message to be shown to the user. 'configurable' is the configurable object in whose context the coercion is taking place.

May return a Deferred.
API Documentation for Nevow, generated by pydoctor.