If you have a controller method like so:
@expose("json") def artists(self, action="view",artist_id=None): artists=session.query(model.Artist).all() return dict(artists=artists)
How can you call that method from within your controller class, and get the python dict back - rather than the json-encoded string of the dict (which requires you to decode it from json back into a python dict). Is it really necessary to write one function to get the data out of your model, and another to pack that data for use by the templates (KID, JSON)? Why is it that when you call this method from in the same class, e.g.:
artists = self.artists()
You get a json string, when that's only appropriate if the method is called as part of a HTML request. What have I missed?