Logo Search packages:      
Sourcecode: zine version File versions  Download package

zine::utils::forms::Mapping Class Reference

Inheritance diagram for zine::utils::forms::Mapping:

zine::utils::forms::Field zine::utils::forms::FormAsField zine::utils::forms::FormMapping

List of all members.


Detailed Description

Apply a set of fields to a dictionary of values.

>>> field = Mapping(name=TextField(), age=IntegerField())
>>> field({'name': u'John Doe', 'age': u'42'})
{'age': 42, 'name': u'John Doe'}

Although it's possible to reassign the widget after field construction
it's not recommended because the `MappingWidget` is the only builtin
widget that is able to handle mapping structures.

Definition at line 1026 of file forms.py.


Public Member Functions

def __call__
def __copy__
def __init__
def __init__
def __repr__
def apply_validators
def bound
def convert
def get_default
def should_validate
def to_primitive

Public Attributes

 custom_converter
 fields
 help_text
 label
 messages
 validators

Static Public Attributes

tuple choices = ()
 form = None
tuple messages = dict(required=lazy_gettext('This field is required.'))
 multiple_choices = False
 validate_on_omission = False
 widget = MappingWidget

Private Member Functions

def _bind

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index