def render_iconchoicefield(field, attrs):
	"""
	Render a ChoiceField with icon support; where the value is split by a pipe
	(|): first element being the value, last element is the icon.
	"""
	choices = ""

	# Loop over every choice to manipulate
	for choice in field.field._choices:
		value = choice[1].split("|")  # Value|Icon

		# Each choice is formatted with the choice value being split with
		# the "|" as the delimeter. First element is the value, the second
		# is the icon to be used.
		choices += format_html(
			wrappers.ICON_CHOICE_TEMPLATE,
			choice[0],  # Key
			mark_safe(wrappers.ICON_TEMPLATE.format(value[-1])),  # Icon
			value[0]  # Value
		)

	# Render a dropdown field
	return render_choicefield(field, attrs, choices)
Render a ChoiceField with icon support; where the value is split by a pipe
	(|): first element being the value, last element is the icon.