@library.global_function
def mozillians_field(element, required=False):
 template = get_template('includes/field.html')
 context = {'field': element, 'flag_required': required}
 return mark_safe(template.render(context))

@ library . global_function def mozillians_field ( element , required = False ) : template = get_template ( 'includes/field.html' ) context = { 'field' : element , 'flag_required' : required } return mark_safe ( template . render ( context ) )
renders fields in jinja2 .