Package turbogears :: Module validators :: Class DateTimeConverter

Class DateTimeConverter

source code

                        object --+                
                                 |                
formencode.declarative.Declarative --+            
                                     |            
              formencode.api.Validator --+        
                                         |        
             formencode.api.FancyValidator --+    
                                             |    
                              TgFancyValidator --+
                                                 |
                                                DateTimeConverter

Convert between Python datetime objects and strings.

**Messages**

``badFormat``:
  Invalid datetime format

``badType``:
  The input must be a string (not a ``%(type)s``: ``%(value)r``)

``empty``:
  Empty values not allowed

``noneType``:
  The input must be a string (not None)

Nested Classes

Inherited from formencode.api.FancyValidator: if_empty, if_invalid, if_invalid_python

Inherited from formencode.api.Validator: if_missing

Inherited from formencode.declarative.Declarative: __metaclass__

Instance Methods

Inherited from formencode.api.FancyValidator: assert_string, base64encode, empty_value, from_python, is_empty, to_python, validate_other, validate_python

Inherited from formencode.api.Validator: __init__, all_messages, message, subvalidators

Inherited from formencode.declarative.Declarative: __call__, __initargs__, __repr__, __sourcerepr__

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

Class Methods

Inherited from formencode.declarative.Declarative: __classsourcerepr__, singleton

Static Methods

Inherited from formencode.api.FancyValidator: __classinit__

Class Variables
  format = '%Y/%m/%d %H:%M'
  messages = {'badFormat': _('Invalid datetime format'), 'empty'...
  declarative_count = 67

Inherited from TgFancyValidator: gettextargs

Inherited from formencode.api.FancyValidator: accept_python, not_empty, strip

Inherited from formencode.api.Validator: __singletonmethods__, accept_iterator, compound, repeating, use_builtins_gettext

Inherited from formencode.declarative.Declarative: __mutableattributes__, __unpackargs__, counter

Properties

Inherited from object: __class__

Class Variable Details

messages

Value:
{'badFormat': _('Invalid datetime format'), 'empty': _('Empty values n\
ot allowed'),}