Export templates adds windows line break (CRLF - Carriage Return). #426

Closed
opened 2025-12-29 16:21:57 +01:00 by adam · 0 comments
Owner

Originally created by @aabouzaid on GitHub (Sep 9, 2016).

Hello,

I just used the example of "Export templates" in netbox documentation:

Admin panel > Extras > Export Templates

{% for d in queryset %}{% if d.status and d.primary_ip %}define host{
        use                     generic-switch
        host_name               {{ d.name }}
        address                 {{ d.primary_ip.address.ip }}
}
{% endif %}{% endfor %}

And the exported file has windows line break (CRLF - Carriage Return - "\r").

$ file netbox_devices
netbox_devices:       ASCII text, with CRLF line terminators

I think this shouldn't happen. And it should be Unix line terminators "\n".

Env info:

Netbox develop branch with latest docker image (docker compose).

Originally created by @aabouzaid on GitHub (Sep 9, 2016). Hello, I just used the example of "[Export templates](http://netbox.readthedocs.io/en/latest/data-model/extras/#export-templates)" in netbox documentation: > Admin panel > Extras > Export Templates ``` {% for d in queryset %}{% if d.status and d.primary_ip %}define host{ use generic-switch host_name {{ d.name }} address {{ d.primary_ip.address.ip }} } {% endif %}{% endfor %} ``` And the exported file has windows line break (CRLF - Carriage Return - "\r"). ``` $ file netbox_devices netbox_devices: ASCII text, with CRLF line terminators ``` I think this shouldn't happen. And it should be Unix line terminators "\n". ## Env info: Netbox `develop` branch with latest docker image (docker compose).
adam added the type: bug label 2025-12-29 16:21:57 +01:00
adam closed this issue 2025-12-29 16:21:57 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#426