本文整理汇总了Python中assembl.models.Idea.get_idea_ids_showing_post方法的典型用法代码示例。如果您正苦于以下问题:Python Idea.get_idea_ids_showing_post方法的具体用法?Python Idea.get_idea_ids_showing_post怎么用?Python Idea.get_idea_ids_showing_post使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类assembl.models.Idea
的用法示例。
在下文中一共展示了Idea.get_idea_ids_showing_post方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: idea_connexions
# 需要导入模块: from assembl.models import Idea [as 别名]
# 或者: from assembl.models.Idea import get_idea_ids_showing_post [as 别名]
def idea_connexions(request):
# Returns the ideas this post is connected to.
# This is a list of tuples of the form:
# [idea, connexion_idea, connexion_post, extract?]
# the idea is an ancestor or equal to connexion_idea
# the connexion_post is an ancestor or equal to current post
from assembl.models import Idea
ctx = request.context
post = ctx._instance
return Idea.get_idea_ids_showing_post(post.id, True, True)
示例2: get_ideas_of_post
# 需要导入模块: from assembl.models import Idea [as 别名]
# 或者: from assembl.models.Idea import get_idea_ids_showing_post [as 别名]
def get_ideas_of_post(post_id):
if post_id not in ideas_of_posts:
ideas_of_posts[post_id] = Idea.get_idea_ids_showing_post(post_id)
return ideas_of_posts[post_id]