'Pretty printing of models by their primary key'

def __str__(self):

    return '{0}    <{1}>'.format(self.__class__.__name__, ',    '.join(('{0}={1}'.format(k, getattr(self, k)) for k in self._primary_keys.keys())))
