def render_disc(id, **kwargs): disc = g.db.query(models.Disc).filter_by(id=id).one() flashvars = {'jsonDisc': json.dumps(models.toJso(disc))} for k, v in kwargs.iteritems(): flashvars[k] = json.dumps(v) return render_template('disc.html', flashvars=flashvars, disc=disc_edit)
def disc_json(id): disc = g.db.query(models.Disc).filter_by(id=id).one() return json.dumps(models.toJso(disc))