(match)
| 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 |
| 2010 | field_name = match.group(1).split(".") |
| 2011 | fields = self._document._lookup_field(field_name) |
| 2012 | # Substitute the correct name for the field into the javascript |
| 2013 | return ".".join([f.db_field for f in fields]) |
| 2014 | |
| 2015 | code = re.sub(r"\[\s*~([A-z_][A-z_0-9.]+?)\s*\]", field_sub, code) |
| 2016 | code = re.sub(r"\{\{\s*~([A-z_][A-z_0-9.]+?)\s*\}\}", field_path_sub, code) |
nothing calls this directly
no test coverage detected