export template formating with jinja #15105
Replies: 1 comment 3 replies
-
Probably your timeout from gunicorn or apache/nginx is too short, and these can be increased. If you want to reduce the number of devices in your export, there are many approaches, including:
Alternatively, you could change from using export templates or reports to scripts. Scripts work in the background, and the browser polls every few seconds until they are completed. I think I saw that merging Reports and Scripts is being considered for a future version.
A device doesn't have an attribute The best way to test these attributes interactively is in nbshell
However in this case there's a better approach: filter the list of devices top be exported.
Again, see the template designer documentation linked above, especially the section on whitespace control. You probably want:
|
Beta Was this translation helpful? Give feedback.
-
Hi,
I am trying to create export template for our EOL devices list but netbox always give proxy error because of long list which cannot be handle by netbox so , is it possible to limit the ouput with number of lines in the csv file with jinja2 template?
**{% for device in queryset %}
{% if device.sites == "eu" %}
{% endif %}
{% endfor %}**
and finally when I download csv it give the output with one line spacing instead so is there any way to remove the blank line in CSV (null line while)

Sorry I have asked multiple queries in one quiestion...
Beta Was this translation helpful? Give feedback.
All reactions