8984 add to detail view and search index

This commit is contained in:
Arthur 2024-06-10 10:33:53 -07:00
parent 783b16ae5d
commit 47ebb51281
2 changed files with 6 additions and 1 deletions

View File

@ -31,6 +31,10 @@
<th scope="row">{% trans "Description" %}</th> <th scope="row">{% trans "Description" %}</th>
<td>{{ object.description|placeholder }}</td> <td>{{ object.description|placeholder }}</td>
</tr> </tr>
<tr>
<th scope="row">{% trans "Serial Number" %}</th>
<td>{{ object.serial_number|placeholder }}</td>
</tr>
<tr> <tr>
<th scope="row">{% trans "Tenant" %}</th> <th scope="row">{% trans "Tenant" %}</th>
<td> <td>

View File

@ -40,10 +40,11 @@ class VirtualMachineIndex(SearchIndex):
model = models.VirtualMachine model = models.VirtualMachine
fields = ( fields = (
('name', 100), ('name', 100),
('serial_number', 300),
('description', 500), ('description', 500),
('comments', 5000), ('comments', 5000),
) )
display_attrs = ('site', 'cluster', 'device', 'tenant', 'platform', 'status', 'role', 'description') display_attrs = ('site', 'cluster', 'device', 'tenant', 'platform', 'status', 'serial_number', 'role', 'description')
@register_search @register_search