Skip to content

Unable to render interface.tags.name in config template #13571

Answered by candlerb
chuegel asked this question in Help Wanted!
Discussion options

You must be logged in to vote

Try interface.tags.names()

/opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py nbshell
### NetBox interactive shell (netbox3)
### Python 3.8.10 | Django 4.1.10 | NetBox 3.5.8
### lsmodels() will show available models. Use help(<model>) for more info.
>>> d = Device.objects.get(name="nuc1")
>>> d.tags.names()
<RestrictedQuerySet ['prom_node']>
>>> "prom_node" in d.tags.names()
True

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
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 chuegel
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants