def wrapper(view, context, model, name): # `view` is current administrative view # `context` is instance of jinja2.runtime.Context # `model` is model instance # `name` is property name if hasattr(model.__class__, name): data = getattr(model, name) if data: return markup(func(data) or '') return ''
def wrapper(view, context, model, name): # `view` is current administrative view # `context` is instance of jinja2.runtime.Context # `model` is model instance # `name` is property name return markup(func(model) or '')