def toChoices(object_list):
    """A function to format a list of objects to a list of two-element
    tuples expected by django select widgets.  Of the form ('value','display')"""
    if len(object_list[0]) == 2:
        return [(x[1], x[1]) for x in object_list]
    else:
        return [(x[1], x[2]) for x in object_list]