def _route_choices():
    # Only type='3' for buses at the moment
    ids = []
    for route in Route.objects.filter(type='3').only('name'):
        try:
            name = int(route.name)
        except __HOLE__:
            name = route.name
        ids.append(name)
    return [(str(x), str(x)) for x in sorted(ids)]
dataset/ETHPy150Open shaunduncan/breezeminder/breezeminder/forms/marta.py/_route_choices