本文整理汇总了Python中models.category.Category.all方法的典型用法代码示例。如果您正苦于以下问题:Python Category.all方法的具体用法?Python Category.all怎么用?Python Category.all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.category.Category
的用法示例。
在下文中一共展示了Category.all方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get
# 需要导入模块: from models.category import Category [as 别名]
# 或者: from models.category.Category import all [as 别名]
def get(self,key):
user = User()
categroy = Category()
user_keys = user.allKey()
category_keys = categroy.allKey()
_data_user = user.all(user_keys)
_data_category = categroy.all(category_keys)
data = {}
if key:
board = Board()
board.data = board.get(key)
data['title'] = board.data['title']
data['key'] = board.data['key']
data['user'] = board.data['user']
data['category'] = board.data['category']
data['createTime'] = board.data['createTime']
data['follow'] = board.data['follow']
else:
data['title'] = ''
data['key'] = ''
data['user'] = ''
data['category'] = ''
self.render('manager/board_new.html',data = data,data_user = _data_user,data_category = _data_category)