'Return a set of detailed attributes for a visualization in dictionary form.
The visualization\'s latest_revision is returned in its own sub-dictionary.
NOTE: that encoding ids isn\'t done here should happen at the caller level.'

def get_visualization_dict(self, visualization):

    return {'model_class': 'Visualization', 'id': visualization.id, 'title': visualization.title, 'type': visualization.type, 'user_id': visualization.user.id, 'dbkey': visualization.dbkey, 'slug': visualization.slug, 'latest_revision': self.get_visualization_revision_dict(visualization.latest_revision), 'revisions': [r.id for r in visualization.revisions]}
