Add tenant to floor plans with tenant filters

Floor plans get an optional tenant (inherited from location or site on
creation; existing plans are pre-filled by the migration). The list
view supports tenant and tenant group filtering and columns, and the
tenant is exposed in forms, CSV import, REST API and the detail page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
MrBlakeandClaude Opus 5.5 committed 2026-11-04 13:04:15 +01:00
1 parent 805aedba52
commit 04a6e16975
16 files changed
+87 -16

No files matched your search

+1 -1
View File
@@ -10,7 +10,7 @@ from .serializers import FloorPlanItemSerializer, FloorPlanSerializer, LayoutSer
class FloorPlanViewSet(NetBoxModelViewSet):
queryset = FloorPlan.objects.select_related('site', 'location').prefetch_related('tags').annotate(
queryset = FloorPlan.objects.select_related('site', 'location', 'tenant').prefetch_related('tags').annotate(
item_count=Count('items')
)
serializer_class = FloorPlanSerializer