diff --git a/netbox/templates/utilities/obj_bulk_import.html b/netbox/templates/utilities/obj_bulk_import.html index b735adb39..4359d49a6 100644 --- a/netbox/templates/utilities/obj_bulk_import.html +++ b/netbox/templates/utilities/obj_bulk_import.html @@ -71,9 +71,7 @@ {% elif field.label %} {{ field.label }}
{% endif %} - {% if field.choices %} - Choices: {{ field|example_choices }} - {% elif field|widget_type == 'dateinput' %} + {% if field|widget_type == 'dateinput' %} Format: YYYY-MM-DD {% elif field|widget_type == 'checkboxinput' %} Specify "true" or "false" diff --git a/netbox/utilities/templatetags/helpers.py b/netbox/utilities/templatetags/helpers.py index 466690a4c..8a82fc48b 100644 --- a/netbox/utilities/templatetags/helpers.py +++ b/netbox/utilities/templatetags/helpers.py @@ -116,28 +116,6 @@ def humanize_speed(speed): return '{} Kbps'.format(speed) -@register.filter() -def example_choices(field, arg=3): - """ - Returns a number (default: 3) of example choices for a ChoiceFiled (useful for CSV import forms). - """ - examples = [] - if hasattr(field, 'queryset'): - choices = [ - (obj.pk, getattr(obj, field.to_field_name)) for obj in field.queryset[:arg + 1] - ] - else: - choices = field.choices - for value, label in unpack_grouped_choices(choices): - if len(examples) == arg: - examples.append('etc.') - break - if not value or not label: - continue - examples.append(label) - return ', '.join(examples) or 'None' - - @register.filter() def tzoffset(value): """