{% macro onchange(js) -%} {%- if js is not none %} onchange="{{ js }}"{% endif -%} {%- endmacro %} {% macro measurement_options(selected=none) %} {% for meas in g.measurements.values() %} {% endfor %} {% endmacro %} {% macro station_options(selected=none) %} {% for station in g.stations %} {% endfor %} {% endmacro %} {% macro year_options(selected=none) %} {% for year in g.all_years %} {% endfor %} {% endmacro %} {% set options = { 'measurement': measurement_options, 'station': station_options, 'year': year_options, } %} {% macro _selected(is_selected) %} {%- if is_selected %} selected{% endif -%} {% endmacro %}