@expose("json")
def artists(self, action="view",artist_id=None):
artists=session.query(model.Artist).all()
return dict(artists=artists)
artists = self.artists()
# The _artists method can be used from any other method
def _artists(self, action, artist_id):
artists = session.query(model.Artist).all()
return dict(artists=artists)
@expose("json")
#@identity.require(identity.non_anonymous())
# error handlers, etc.
def artists(self, action="view", artist_id=None):
return self._artists(action=action, artist_id=artist_id)