parameters: ()
return_statement: return out
docstring: 树形列表
docstring_summary: 树形列表
docstring_tokens: 树形列表
function: def tree():
          """树形列表"""
          cates = Category.query.all()
          out = []
          for cate in cates:
              indent = len(cate.longslug.split('/')) - 1
              out.append((indent, cate))
          return out
function_tokens: def tree ( ) : cates = Category . query . all ( ) out = [ ] for cate in cates : indent = len ( cate . longslug . split ( '/' ) ) - 1 out . append ( ( indent , cate ) ) return out