MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / MapField

Class MapField

mongoengine/fields.py:1087–1097  ·  view source on GitHub ↗

A field that maps a name to a specified field type. Similar to a DictField, except the 'value' of each item must match the specified field type.

Source from the content-addressed store, hash-verified

1085
1086
1087class MapField(DictField):
1088 """A field that maps a name to a specified field type. Similar to
1089 a DictField, except the 'value' of each item must match the specified
1090 field type.
1091 """
1092
1093 def __init__(self, field=None, *args, **kwargs):
1094 # XXX ValidationError raised outside the "validate" method.
1095 if not isinstance(field, BaseField):
1096 self.error("Argument to MapField constructor must be a valid field")
1097 super().__init__(field=field, *args, **kwargs)
1098
1099
1100class ReferenceField(BaseField):

Callers 15

PersonClass · 0.90
GroupClass · 0.85
BlogPostClass · 0.85
ClubClass · 0.85
SiteClass · 0.85
DocClass · 0.85
MyDocClass · 0.85
EmbeddedUserClass · 0.85
DocClass · 0.85
DocClass · 0.85
BlogClass · 0.85
ParameterClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected