How can I programmatically change sections of a Django template on the fly?
Given this template:
{% for it in itemlist_1 %}
{{it.unique_display_function_1}}
{%endfor%}
{% for it in itemlist_2 %}
{{it.unique_display_function_2}}
{{it.unique_display_function_2a}}
{{it.unique_display_function_2b}}
{%endfor%}
...
{% for it in itemlist_n %}
{{it.unique_display_function_n}}
{{it.unique_display_function_n_sub_x}}
{{it.unique_display_function_n_sub_xyz}}
{%endfor%}
How could I build a generic Django template so that every time this template is rendered external settings determine what order the itemlists are rendered in the template?
So the list of n sections can appear in any order according to some external settings.
NOTE: Updated to show that each section of the template has a lot of sub-parts and is actually quite long.