通过parent_id属性将Items组织在文件夹/树状结构中。因此,可以创建以下层次结构:
问题是-我想不出一种优雅的方法来检索Item的所有子项树。一种解决方案是使用递归。items# id :integer not null, primary key# parent_id# for item with ID 1 must return items with IDs [2, 3]
def
我想导出一个节从我的盖茨比网站作为一个独立的html组件的css样式(从样式-组件),以便可以插入到博客作为一个片段。这是一种自动的方式吗,还是我被迫使用Inspect Element -> copy HTML -> manually write/copy all the compiled classes and styles of each html block?