如何在Jinjia2模板中使用复杂数据,如Python列表 ''' Jinjia2 ''' from flask import * app = Flask(__name__) class MyClass: def func(self): return 'myclass func' def myfunc(): return 'function' @app.route('/') def index(): mydict = {} mydict['type'] = 'dict' mylist = [] mylist.append('lis