(self, target)
returns a list of tuples that can be used as choices for a ChoiceField.
        the first item in each tuple is a letter identifying the type of the
        sync-target - either d for a Device, or g for a SyncGroup. This letter
        is followed by the id of the target.
        The second item in each tuple is the string-representation of the #
        target.
returns a list of tuples that can be used as choices for a ChoiceField.
        the first item in each tuple is a letter identifying the type of the
        sync-target - either d for a Device, or g for a SyncGroup. This letter
        is followed by the id of the target.
        The second item in each tuple is the string-representation of the #
        target.
returns a list of tuples that can be used as choices for a ChoiceField . the first item in each tuple is a letter identifying the type of the sync - target - either d for a Device or g for a SyncGroup . This letter is followed by the id of the target . The second item in each tuple is the string - representation of the # target .
def sync_target_choice(self, target):
        """
        returns a list of tuples that can be used as choices for a ChoiceField.
        the first item in each tuple is a letter identifying the type of the
        sync-target - either d for a Device, or g for a SyncGroup. This letter
        is followed by the id of the target.
        The second item in each tuple is the string-representation of the #
        target.
        """

        if isinstance(target, Client):
            return (target.uid, target.name)

        elif isinstance(target, list):
            return (target[0].uid, ", ".join(d.name for d in target))
def sync_target_choice ( self , target ) : if isinstance ( target , Client ) : return ( target . uid , target . name ) elif isinstance ( target , list ) : return ( target [ 0 ] . uid , ", " . join ( d . name for d in target ) )