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

Method field_sub

mongoengine/queryset/base.py:2001–2006  ·  view source on GitHub ↗
(match)

Source from the content-addressed store, hash-verified

1999 """
2000
2001 def field_sub(match):
2002 # Extract just the field name, and look up the field objects
2003 field_name = match.group(1).split(".")
2004 fields = self._document._lookup_field(field_name)
2005 # Substitute the correct name for the field into the javascript
2006 return '["%s"]' % fields[-1].db_field
2007
2008 def field_path_sub(match):
2009 # Extract just the field name, and look up the field objects

Callers

nothing calls this directly

Calls 1

_lookup_fieldMethod · 0.80

Tested by

no test coverage detected