qm :: fields :: TimeField :: Class TimeField
[hide private]
[frames] | no frames]

Class TimeField

source code

object --+        
         |        
     Field --+    
             |    
  IntegerField --+
                 |
                TimeField

A field containing a date and time.

The data and time is stored as seconds since the start of the UNIX epoch, UTC (the semantics of the standard 'time' function), with one-second precision. User representations of 'TimeField' fields show one-minue precision.

Instance Methods [hide private]
 
__init__(self, name='', **properties)
Create a time field.
source code
 
GetHelp(self)
Generate help text about this field in structured text format.
source code
 
FormatValueAsText(self, value, columns=72)
Return a plain text rendering of a 'value' for this field.
source code
 
FormatValueAsHtml(self, server, value, style, name=None)
Return an HTML rendering of a 'value' for this field.
source code
 
ParseTextValue(self, value)
Parse a value represented as a string.
source code
 
GetDefaultValue(self)
Return the default value for this field.
source code

Inherited from IntegerField: GetValueFromDomNode, MakeDomNodeForValue, Validate

Inherited from Field: GetBriefDescription, GetDescription, GetHtmlFormFieldName, GetHtmlHelp, GetName, GetSubfields, GetTitle, IsComputed, IsHidden, IsReadOnly, ParseFormValue, SetName, __repr__

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

Class Variables [hide private]

Inherited from Field: form_field_prefix

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name='', **properties)
(Constructor)

source code 

Create a time field.

The field is given a default value for this field is 'None', which corresponds to the current time when the field value is first created.

Overrides: object.__init__

GetHelp(self)

source code 

Generate help text about this field in structured text format.

Overrides: Field.GetHelp
(inherited documentation)

FormatValueAsText(self, value, columns=72)

source code 

Return a plain text rendering of a 'value' for this field.

'columns' -- The maximum width of each line of text.

returns -- A plain-text string representing 'value'.

Overrides: Field.FormatValueAsText
(inherited documentation)

FormatValueAsHtml(self, server, value, style, name=None)

source code 

Return an HTML rendering of a 'value' for this field.

'server' -- The 'WebServer' in which the HTML will be displayed.

'value' -- The value for this field. May be 'None', which renders a default value (useful for blank forms).

'style' -- The rendering style. Can be "full" or "brief" (both read-only), or "new" or "edit" or "hidden".

'name' -- The name to use for the primary HTML form element containing the value of this field, if 'style' specifies the generation of form elements. If 'name' is 'None', the value returned by 'GetHtmlFormFieldName()' should be used.

returns -- A string containing the HTML representation of 'value'.

Overrides: Field.FormatValueAsHtml
(inherited documentation)

ParseTextValue(self, value)

source code 

Parse a value represented as a string.

'value' -- A string representing the value.

returns -- The corresponding field value. The value returned should be processed by 'Validate' to ensure that it is valid before it is returned.

Overrides: Field.ParseTextValue
(inherited documentation)

GetDefaultValue(self)

source code 

Return the default value for this field.

Overrides: Field.GetDefaultValue
(inherited documentation)