Просмотр исходного кода

Closes #9152: Annotate related object type under custom field view

jeremystretch 3 лет назад
Родитель
Сommit
41244dc677
2 измененных файлов с 8 добавлено и 1 удалено
  1. 4 0
      docs/release-notes/version-3.2.md
  2. 4 1
      netbox/templates/extras/customfield.html

+ 4 - 0
docs/release-notes/version-3.2.md

@@ -2,6 +2,10 @@
 
 ## v3.2.2 (FUTURE)
 
+### Enhancements
+
+* [#9152](https://github.com/netbox-community/netbox/issues/9152) - Annotate related object type under custom field view
+
 ### Bug Fixes
 
 * [#9133](https://github.com/netbox-community/netbox/issues/9133) - Upgrade script should require Python 3.8 or later

+ 4 - 1
netbox/templates/extras/customfield.html

@@ -21,7 +21,10 @@
           </tr>
           <tr>
             <th scope="row">Type</th>
-            <td>{{ object.get_type_display }}</td>
+            <td>
+              {{ object.get_type_display }}
+              {% if object.object_type %}({{ object.object_type.model|bettertitle }}){% endif %}
+            </td>
           </tr>
           <tr>
             <th scope="row">Description</th>