1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #6130: Improve display of assigned models in custom fields list

This commit is contained in:
jeremystretch
2021-04-09 09:43:35 -04:00
parent 696b5c80a7
commit 9e62d1ad8f
4 changed files with 15 additions and 3 deletions

View File

@@ -296,6 +296,14 @@ def array_to_string(array):
return ', '.join('-'.join(map(str, (g[0], g[-1])[:len(g)])) for g in group)
def content_type_name(contenttype):
"""
Return a proper ContentType name.
"""
meta = contenttype.model_class()._meta
return f'{meta.app_config.verbose_name} > {meta.verbose_name}'
#
# Fake request object
#