You are using info.serverfunction_set.all
in your template which would be correct if you were traversing a reverse relationship (i.e. you had a ServerFunction
and wanted all the related Inventory
items). But you aren't, you have a simple forward relationship between Inventory
and a ServerFunction
:
{% for info in host_info %}
{{ func.server_function.server_function }}
{% endfor %}