MCPcopy Create free account
hub / github.com/MongoEngine/mongoengine / __init__

Method __init__

mongoengine/base/fields.py:598–606  ·  view source on GitHub ↗

:param bool auto_index: Automatically create a '2dsphere' index.\ Defaults to `True`.

(self, auto_index=True, *args, **kwargs)

Source from the content-addressed store, hash-verified

596 _type = "GeoBase"
597
598 def __init__(self, auto_index=True, *args, **kwargs):
599 """
600 :param bool auto_index: Automatically create a '2dsphere' index.\
601 Defaults to `True`.
602 """
603 self._name = "%sField" % self._type
604 if not auto_index:
605 self._geo_index = False
606 super().__init__(*args, **kwargs)
607
608 def validate(self, value):
609 """Validate the GeoJson object based on its type."""

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected