

def _resolve(self, context, name):
    '\n            Resolve macro in a Jinja2 context\n\n            :param context:\n                Jinja2 context\n            :param name:\n                Macro name. May be full path (with dots)\n        '
    parts = name.split('.')
    field = context.resolve(parts[0])
    if (not field):
        return None
    for p in parts[1:]:
        field = getattr(field, p, None)
        if (not field):
            return field
    return field

dataset/ETHPy150Open mrjoes/flask-admin/flask_admin/form/rules.py Macro._resolve/original