Skip to content

Get custom field in config template #15528

Answered by nbghp
nbghp asked this question in Help Wanted!
Discussion options

You must be logged in to vote

I figured it out myself! Maybe it helps someone else! ;)

Working:
{% for interface in device.interfaces.all() %}
{% if interface.name == "ether1" %}
{{ interface.cf["default_gateway"] }}
{% endif %}
{% endfor %}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by nbghp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant