def anchor(parser, token):
    """
    Parses a tag that's supposed to be in this format: {% anchor field title %}    
    """
    bits = [b.strip('"\'') for b in token.split_contents()]
    if len(bits) < 2:
        raise TemplateSyntaxError, "anchor tag takes at least 1 argument"
    try:
        title = bits[2]
    except __HOLE__:
        title = bits[1].capitalize()
    return SortAnchorNode(bits[1].strip(), title.strip())
dataset/ETHPy150Open directeur/django-sorting/django_sorting/templatetags/sorting_tags.py/anchor