from django import template

register = template.Library()

@register.filter(name='split')
def split(value, delimiter):
    """
    Split a string by a delimiter and return a list.
    """
    if not value:
        return []

    return str(value).split(delimiter)
