Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的项目中有三个模型,我需要遍历所有这些模型以显示 3 个表格的内容。所以我想知道的是如何在.volt文件中显示一个有很多属于关系的(sql中的一个连接)?
使用您的模型传递给视图变量,然后在视图中:
{% for item in model.alias of related relation %} do something with item {% endfor %}