{% comment %} This
holds the user's widgets and does not need to update while the window is open, hence it's loaded in the template to simplify html generation and cut the unnecessary network traffic that a dynamically-loaded list of widgets would create. There are essentially two sections: widgets which belong to a product and widgets that don't. There's potentially a rendering bug in the code as a result of the many-to-many relationship between products and jobs. A job can belong to multiple products, but the logic for manipulating widgets with this window wasn't *designed* with this in consideration. I've run out of time to investigate and test this, but it's something to look out for. Try adding and removing a job which belongs to multiple products to the public display and check that the resulting behavior makes sense. {% endcomment %}

Your Widgets

{% for product in product_widgets %} {% if product.jobs %}
{{ product.productname }} {% for widget in product.jobs %}
  • {{ widget.displayname }} {% if not widget.appletv %}
    Show
    {{ widget.pk }}
    {% else %}
    Remove
    {{ widget.pk }}
    {% endif %}
{% endfor %}
{% endif %} {% endfor %} {% for widget in productless_widgets %}
{{ widget.displayname}} {% if not widget.appletv %}
Show
{{ widget.pk }}
{% else %}
Remove
{{ widget.pk }}
{% endif %}
{% endfor %}

Public TV