OpenQuizz
Une application de gestion des contenus pédagogiques
List Class Reference
Inheritance diagram for List:
Collaboration diagram for List:

Public Member Functions

def __init__ (self, cls_or_instance, **kwargs)
 
def format (self, value)
 
def output (self, key, data, ordered=False, **kwargs)
 
def schema (self)
 
def clone (self, mask=None)
 
- Public Member Functions inherited from Raw
def __init__ (self, default=None, attribute=None, title=None, description=None, required=None, readonly=None, example=None, mask=None, **kwargs)
 
def output (self, key, obj, **kwargs)
 
def __schema__ (self)
 

Data Fields

 min_items
 
 max_items
 
 unique
 
 container
 
- Data Fields inherited from Raw
 attribute
 
 default
 
 title
 
 description
 
 required
 
 readonly
 
 example
 
 mask
 

Detailed Description

Field for marshalling lists of other fields.

See :ref:`list-field` for more information.

:param cls_or_instance: The field type the list will contain.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  cls_or_instance,
**  kwargs 
)

Member Function Documentation

◆ clone()

def clone (   self,
  mask = None 
)

◆ format()

def format (   self,
  value 
)
Formats a field's value. No-op by default - field classes that
modify how the value of existing object keys should be presented should
override this and apply the appropriate formatting.

:param value: The value to format
:raises MarshallingError: In case of formatting problem

Ex::

    class TitleCase(Raw):
def format(self, value):
    return unicode(value).title()

Reimplemented from Raw.

◆ output()

def output (   self,
  key,
  data,
  ordered = False,
**  kwargs 
)

◆ schema()

def schema (   self)

Reimplemented from Raw.

Field Documentation

◆ container

container

◆ max_items

max_items

◆ min_items

min_items

◆ unique

unique

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