You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This simple snippet is a jinja2 circuit based export template. I'd like to access properties of the A-side circuit_termination. To do so I currently loop over all terminations and filter on an attribute. Instead of looping- can the jinja2 language directly target (search for?) the desired object?
{% for c in queryset -%}
tenant: {{ c.tenant }}
{% for ct in c.terminations.all() -%}
{% if ct.term_side == 'A' -%}
A_site_name: {{ ct.site.name }}
{% endif %}
{% endfor %}
{% endfor %}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi team,
This simple snippet is a jinja2 circuit based export template. I'd like to access properties of the A-side circuit_termination. To do so I currently loop over all terminations and filter on an attribute. Instead of looping- can the jinja2 language directly target (search for?) the desired object?
Beta Was this translation helpful? Give feedback.
All reactions