{% if user.is_authenticated %}
{{ instance.code|escape }}
{% endif %}