[PR #2297] [MERGED] Adopt django-taggit-serializer for representation of assigned tags in the API #12354

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/2297
Author: @jeremystretch
Created: 8/2/2018
Status: Merged
Merged: 8/3/2018
Merged by: @jeremystretch

Base: develop-2.4Head: django-taggit-serializer


📝 Commits (2)

  • 0b47c2d Adopt django-taggit-serializer for representation of assigned tags in the API
  • 5d90516 Add django-taggit-serializer to requirements

📊 Changes

11 files changed (+66 additions, -77 deletions)

View changed files

📝 base_requirements.txt (+1 -0)
📝 netbox/circuits/api/serializers.py (+6 -6)
📝 netbox/dcim/api/serializers.py (+26 -26)
📝 netbox/ipam/api/serializers.py (+12 -12)
📝 netbox/netbox/settings.py (+1 -0)
📝 netbox/secrets/api/serializers.py (+4 -4)
📝 netbox/tenancy/api/serializers.py (+4 -4)
📝 netbox/utilities/api.py (+3 -17)
📝 netbox/utilities/utils.py (+2 -2)
📝 netbox/virtualization/api/serializers.py (+6 -6)
📝 requirements.txt (+1 -0)

📄 Description

Fixes: #2296

There are several issues with the way we handle tags in the API. These are difficult to resolve, since the tags manager isn't quite the same as a traditional ManyToManyField, specifically in that it reads and writes a list of strings. We should employ django-taggit-serializer, which appears to have worked out these issues. The project is a bit stale, but I don't see much changing in the near future, and we can always clone it internally if needed.


🔄 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/2297 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 8/2/2018 **Status:** ✅ Merged **Merged:** 8/3/2018 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop-2.4` ← **Head:** `django-taggit-serializer` --- ### 📝 Commits (2) - [`0b47c2d`](https://github.com/netbox-community/netbox/commit/0b47c2dfcd3e4b244e1f157c865e6a505fbe015b) Adopt django-taggit-serializer for representation of assigned tags in the API - [`5d90516`](https://github.com/netbox-community/netbox/commit/5d9051612f08ac62e2433c16da34d9d11c9af38c) Add django-taggit-serializer to requirements ### 📊 Changes **11 files changed** (+66 additions, -77 deletions) <details> <summary>View changed files</summary> 📝 `base_requirements.txt` (+1 -0) 📝 `netbox/circuits/api/serializers.py` (+6 -6) 📝 `netbox/dcim/api/serializers.py` (+26 -26) 📝 `netbox/ipam/api/serializers.py` (+12 -12) 📝 `netbox/netbox/settings.py` (+1 -0) 📝 `netbox/secrets/api/serializers.py` (+4 -4) 📝 `netbox/tenancy/api/serializers.py` (+4 -4) 📝 `netbox/utilities/api.py` (+3 -17) 📝 `netbox/utilities/utils.py` (+2 -2) 📝 `netbox/virtualization/api/serializers.py` (+6 -6) 📝 `requirements.txt` (+1 -0) </details> ### 📄 Description ### Fixes: #2296 There are several issues with the way we handle tags in the API. These are difficult to resolve, since the tags manager isn't quite the same as a traditional ManyToManyField, specifically in that it reads and writes a list of strings. We should employ [django-taggit-serializer](https://github.com/glemmaPaul/django-taggit-serializer), which appears to have worked out these issues. The project is a bit stale, but I don't see much changing in the near future, and we can always clone it internally if needed. --- <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:21:02 +01:00
adam closed this issue 2025-12-29 22:21:02 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12354