@register.simple_tag
def active_starts(request, pattern):
    if request.path.startswith(pattern):
        return 'active'
    return ''
Returns the string 'active' if request url starts with pattern.
dataset/ETHPy150Open Tivix/django-common/django_common/templatetags/custom_tags.py/active_starts