本文整理匯總了Python中models.Issue.create方法的典型用法代碼示例。如果您正苦於以下問題:Python Issue.create方法的具體用法?Python Issue.create怎麽用?Python Issue.create使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類models.Issue
的用法示例。
在下文中一共展示了Issue.create方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: save_issues
# 需要導入模塊: from models import Issue [as 別名]
# 或者: from models.Issue import create [as 別名]
def save_issues(issues, project, fetch_index):
for issue in issues:
Issue.create(
fetch_index=fetch_index,
github_id=issue['id'],
project=project,
number=issue['number'],
created_at=issue['created_at'],
updated_at=issue['updated_at'],
closed_at=issue['closed_at'],
state=issue['state'],
body=issue['body'],
comments=issue['comments'],
user_id=issue['user']['id'],
)