{% comment %} Single entry point for rendering one datapoint. Callers pass the mode they want, and nothing else: {% include 'app_data/fields/_field.html' with display_mode="list" %} display_mode: list | detail | print | edit - list/detail/print expect a get_datapoint_ui_detail() datapoint and render the VALUE only (the caller supplies the ) - edit expects a get_datapoint_ui_edit() datapoint and renders a whole Bootstrap form row, label included item.dataformat always names an existing _.html: the datapoint builders normalize it through Field.get_ui_dataformat(), falling back to "unknown". Never resolve a template from a raw schema dataformat here. {% endcomment %} {% include 'app_data/fields/_'|add:item.dataformat|add:'.html' %}