from django import template

register = template.Library()

@register.filter
def distinct_vehicles(vehicles):
    vehicles_set = set(vehicles.split(','))
    vehicles_str = ', '.join(sorted(vehicles_set))
    return vehicles_str


