Closes #1744: Allow associating a platform with a specific manufacturer

This commit is contained in:
Jeremy Stretch
2017-12-19 16:15:26 -05:00
parent 02e01b7386
commit 9984238f2a
8 changed files with 97 additions and 15 deletions

View File

@@ -453,7 +453,10 @@ class RackReservationBulkDeleteView(PermissionRequiredMixin, BulkDeleteView):
#
class ManufacturerListView(ObjectListView):
queryset = Manufacturer.objects.annotate(devicetype_count=Count('device_types'))
queryset = Manufacturer.objects.annotate(
devicetype_count=Count('device_types', distinct=True),
platform_count=Count('platforms', distinct=True),
)
table = tables.ManufacturerTable
template_name = 'dcim/manufacturer_list.html'