|
OpenQuizz
Une application de gestion des contenus pédagogiques
|


Public Member Functions | |
| def | __init__ (self, dt_format='rfc822', **kwargs) |
| def | format (self, value) |
Public Member Functions inherited from Raw | |
| def | __init__ (self, default=None, attribute=None) |
| def | output (self, key, obj) |
Data Fields | |
| dt_format | |
Data Fields inherited from Raw | |
| attribute | |
| default | |
Return a formatted datetime string in UTC. Supported formats are RFC 822 and ISO 8601. See :func:`email.utils.formatdate` for more info on the RFC 822 format. See :meth:`datetime.datetime.isoformat` for more info on the ISO 8601 format. :param dt_format: ``'rfc822'`` or ``'iso8601'`` :type dt_format: str
| def __init__ | ( | self, | |
dt_format = 'rfc822', |
|||
| ** | kwargs | ||
| ) |
| 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
:exception MarshallingException: In case of formatting problem
Ex::
class TitleCase(Raw):
def format(self, value):
return unicode(value).title()
Reimplemented from Raw.
| dt_format |