Replies: 1 comment 1 reply
-
I don't think manufacturer is a direct reference from Device, it's joined through Device Type, and even if it were it'd have it's own key/value pairs so what you probably want is {{device.device_type.manufacturer.name}} or something like that. You could also print another field like id, display, slug, and so on.
Taking a look at the /api/dcim/devices/ output can help you get a better sense of what format the returned data actually looks like
—
Mark Tinberg ***@***.***>
Division of Information Technology-Network Services
University of Wisconsin-Madison
…________________________________
From: settlej ***@***.***>
Sent: Wednesday, January 25, 2023 9:24 AM
To: netbox-community/netbox ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [netbox-community/netbox] Netbox 3.3.2 export template issue, help (Discussion #11580)
I'm unable to export "manufacturer" using the custom export template via jinja2.
{% for device in queryset %}
{{device.name}}
{{device.manufacturer}}
{% endfor %}
Every other field works, even custom fields. Does anyone else see this problem?
—
Reply to this email directly, view it on GitHub<#11580>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAS7UMY2KBRR3RNO4ZOQOPTWUFAS7ANCNFSM6AAAAAAUGOPFDU>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
settlej
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm unable to export "manufacturer" using the custom export template via jinja2.
{% for device in queryset %}
{{device.name}}
{{device.manufacturer}}
{% endfor %}
Every other field works, even custom fields. Does anyone else see this problem?
Beta Was this translation helpful? Give feedback.
All reactions