[PR #6579] [MERGED] Closes #6068: Clean up CSV export #13141

Closed
opened 2025-12-29 22:25:38 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/6579
Author: @jeremystretch
Created: 6/9/2021
Status: Merged
Merged: 6/9/2021
Merged by: @jeremystretch

Base: featureHead: 6068-csv-export


📝 Commits (5)

📊 Changes

28 files changed (+118 additions, -812 deletions)

View changed files

📝 docs/development/extending-models.md (+1 -1)
📝 docs/release-notes/version-3.0.md (+5 -0)
📝 netbox/circuits/forms.py (+4 -2)
📝 netbox/circuits/models.py (+0 -52)
📝 netbox/dcim/forms.py (+40 -21)
📝 netbox/dcim/models/cables.py (+0 -19)
📝 netbox/dcim/models/device_components.py (+0 -135)
📝 netbox/dcim/models/devices.py (+0 -64)
📝 netbox/dcim/models/power.py (+0 -31)
📝 netbox/dcim/models/racks.py (+0 -48)
📝 netbox/dcim/models/sites.py (+0 -57)
📝 netbox/dcim/tests/test_views.py (+7 -2)
📝 netbox/dcim/views.py (+0 -53)
📝 netbox/extras/forms.py (+1 -1)
📝 netbox/extras/models/change_logging.py (+0 -21)
📝 netbox/extras/models/tags.py (+0 -10)
📝 netbox/ipam/forms.py (+12 -9)
📝 netbox/ipam/models/ip.py (+0 -79)
📝 netbox/ipam/models/services.py (+0 -12)
📝 netbox/ipam/models/vlans.py (+0 -24)

...and 8 more files

📄 Description

Closes: #6068

The default CSV export function now utilizes django-tables2 for rendering the output. This output now includes all available data, and utilizes human-friendly titles for the columns rather than the raw model fields. Additionally, the csv_headers attribute has been removed from all models; CSV fields are now consistently declared on each import form.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/6579 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 6/9/2021 **Status:** ✅ Merged **Merged:** 6/9/2021 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `6068-csv-export` --- ### 📝 Commits (5) - [`9d3cac4`](https://github.com/netbox-community/netbox/commit/9d3cac43b77e09efa5d6f90fdeb59b6879e9dc51) Modify default CSV export to render from tables - [`3ec6194`](https://github.com/netbox-community/netbox/commit/3ec6194a47e9a19e945f0eae46c3c50e9c73b3b5) Remove obsolete to_csv() methods - [`5788852`](https://github.com/netbox-community/netbox/commit/578885225fa6747febc7187319f1a7492ba83751) Replace 'default format' export with 'all data' - [`7e18b0d`](https://github.com/netbox-community/netbox/commit/7e18b0dd3a2df8c9d51aaf97b2b0b47585863d0a) Remove csv_headers model attributes - [`7e55b44`](https://github.com/netbox-community/netbox/commit/7e55b44610d20d754297f2e1f90e234ab7d0435a) Changelog for #6068 ### 📊 Changes **28 files changed** (+118 additions, -812 deletions) <details> <summary>View changed files</summary> 📝 `docs/development/extending-models.md` (+1 -1) 📝 `docs/release-notes/version-3.0.md` (+5 -0) 📝 `netbox/circuits/forms.py` (+4 -2) 📝 `netbox/circuits/models.py` (+0 -52) 📝 `netbox/dcim/forms.py` (+40 -21) 📝 `netbox/dcim/models/cables.py` (+0 -19) 📝 `netbox/dcim/models/device_components.py` (+0 -135) 📝 `netbox/dcim/models/devices.py` (+0 -64) 📝 `netbox/dcim/models/power.py` (+0 -31) 📝 `netbox/dcim/models/racks.py` (+0 -48) 📝 `netbox/dcim/models/sites.py` (+0 -57) 📝 `netbox/dcim/tests/test_views.py` (+7 -2) 📝 `netbox/dcim/views.py` (+0 -53) 📝 `netbox/extras/forms.py` (+1 -1) 📝 `netbox/extras/models/change_logging.py` (+0 -21) 📝 `netbox/extras/models/tags.py` (+0 -10) 📝 `netbox/ipam/forms.py` (+12 -9) 📝 `netbox/ipam/models/ip.py` (+0 -79) 📝 `netbox/ipam/models/services.py` (+0 -12) 📝 `netbox/ipam/models/vlans.py` (+0 -24) _...and 8 more files_ </details> ### 📄 Description ### Closes: #6068 The default CSV export function now utilizes django-tables2 for rendering the output. This output now includes all available data, and utilizes human-friendly titles for the columns rather than the raw model fields. Additionally, the `csv_headers` attribute has been removed from all models; CSV fields are now consistently declared on each import form. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:25:38 +01:00
adam closed this issue 2025-12-29 22:25:38 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13141