TRAC. Return a javascript variable back to javascript <p>Is there any way to pass a javascript varialbe during process_request in trac 0.11? The code goes like this:</p> <pre><code>def process_request(self, req): component = req.args.get('component_name') milestones = [] db = self.env.get_db_cnx() cursor = db.cursor() milestones_sql = "SELECT name FROM milestone WHERE component = '" + component+ "'" cursor.execute(milestones_sql) milestones = cursor.fetchall() milestones = itertools.chain(*milestones) db.commit() return 'filter.js', {'milestones':json.dumps(list(milestones))}, 'text/plain' </code></pre> <p>I get arguments, do a SQL query, and want to return result to a script. Not as a string though.</p>