Skip to content

Creating a cable-export template for v3.4.3 #12018

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

You must be logged in to vote

I finally solved this with the help of #11762

At first I didn't understand why one would assign to the variables, but it does make it simpler. I had another order for the fields, maybe this is helpful to someone:

label,status,type,color,length,length_unit,side_a_device,side_a_type,side_a_name,side_b_device,side_b_type,side_b_name {%- for c in queryset %} {%- set act = c.a_terminations[0].cable_terminations.content_type %} {%- set bct = c.b_terminations[0].cable_terminations.content_type %} {%- if act.app_label != 'circuits' and bct.app_label != 'circuits' %} "{{ c.label }}",{{ c.status }},{{ c.type }},{{ c.color }},{{ c.length|default("", True) }},{{ c.length_unit }},{{ c.a_terminations[0…

Replies: 3 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 oneone84
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant