{% load hhphelpers %} {% load thumbnail %} {% getsession block as session %}
{% for category in block.categories %}
{% for item in category.item_set.all %} {% if_magnet_for_item_exists session item %}
{{item.label}}
{% else %}
{{item.label}}
{{item.category}}
I can beat diabetes by
{{item.label}}.
{% endif_magnet_for_item_exists %} {% endfor %}
{% endfor %}
{% if session.magnet_set.count %} {% for magnet in session.magnet_set.all %}
{{magnet.item.label}}
{{magnet.item.category}}

I can beat diabetes by
{{magnet.item.label}}.
{% endfor %} {% endif %}

{% if request.user.is_anonymous %}

You are not logged in: Magnet positions will not be saved

{% endif %}