def do_if(parser, token):
    bits = token.split_contents()[1:]
    var = TemplateIfParser(parser, bits).parse()
    nodelist_true = parser.parse(('else', 'endif'))
    token = parser.next_token()
    if token.contents == 'else':
        nodelist_false = parser.parse(('endif',))
        parser.delete_first_token()
    else:
        nodelist_false = NodeList()
    return IfNode(var, nodelist_true, nodelist_false)
Adds a track or directory to the playlist, specified by the
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/_internal/django/template/defaulttags.py/do_if--crossover with--dataset/ETHPy150Open beetbox/beets/beetsplug/bpd/__init__.py/Server._add