本文整理匯總了Python中core.models.IssueComment類的典型用法代碼示例。如果您正苦於以下問題:Python IssueComment類的具體用法?Python IssueComment怎麽用?Python IssueComment使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了IssueComment類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: add_comment_to_issue
def add_comment_to_issue(issue_id, comment_content, user):
issue = Issue.objects.get(pk=issue_id)
comment = IssueComment.newComment(issue, user, comment_content)
comment.save()
notifyProgrammers_newissuecomment(comment)
notifySponsors_newissuecomment(comment)
return issue
示例2: add_comment_to_issue
def add_comment_to_issue(issue_id, comment_content, user):
issue = Issue.objects.get(pk=issue_id)
issue.touch()
comment = IssueComment.newComment(issue, user, comment_content)
comment.save()
watches = watch_services.find_issue_watches(comment.issue)
notifyWatchers_newissuecomment(comment, watches)
return issue
示例3: abort_existing_solution
def abort_existing_solution(solution_id, comment_content, user):
solution = Solution.objects.get(pk=solution_id)
_throwIfNotSolutionOwner(solution, user)
_throwIfSolutionNotInProgress(solution, user, 'abort solution')
solution.abort()
comment = None
if(comment_content):
comment = IssueComment.newComment(solution.issue, user, comment_content)
comment.save()
notifySponsors_workstopped(solution, comment)
return solution
示例4: resolve_existing_solution
def resolve_existing_solution(solution_id, comment_content, user):
solution = Solution.objects.get(pk=solution_id)
_throwIfNotSolutionOwner(solution, user)
_throwIfSolutionNotInProgress(solution, user, 'resolve solution')
solution.resolve()
comment = None
if(comment_content):
comment = IssueComment.newComment(solution.issue, user, comment_content)
comment.save()
notifySponsors_workdone(solution, comment)
notifyProgrammers_workdone(solution, comment)
return solution
示例5: resolve_existing_solution
def resolve_existing_solution(solution_id, comment_content, user):
solution = Solution.objects.get(pk=solution_id)
solution.issue.touch()
_throwIfNotSolutionOwner(solution, user)
_throwIfSolutionNotInProgress(solution, user, 'resolve solution')
solution.resolve()
comment = None
if(comment_content):
comment = IssueComment.newComment(solution.issue, user, comment_content)
comment.save()
watches = watch_services.find_issue_watches(solution.issue)
notifyWatchers_workdone(solution, comment, watches)
return solution
示例6: revoke_existing_offer
def revoke_existing_offer(offer_id, comment_content, user):
offer = Offer.objects.get(pk=offer_id)
offer.issue.touch()
_throwIfNotOfferOwner(offer, user)
_throwIfOfferNotOpen(offer, user, 'revoke offer')
offer.revoke()
comment = None
if(comment_content):
comment = IssueComment.newComment(offer.issue, user, comment_content)
comment.save()
watches = watch_services.find_issue_and_offer_watches(offer)
notifyWatchers_offerrevoked(offer, comment, watches)
return offer
示例7: abort_existing_solution
def abort_existing_solution(solution_id, comment_content, user):
solution = Solution.objects.get(pk=solution_id)
_throwIfNotSolutionOwner(solution, user)
_throwIfSolutionNotInProgress(solution, user, 'abort solution')
solution.abort()
solution.issue.update_redundant_fields();
comment = None
if(comment_content):
comment = IssueComment.newComment(solution.issue, user, comment_content)
comment.save()
watches = watch_services.find_issue_and_project_watches(solution.issue)
notifyWatchers_workstopped(solution, comment, watches)
return solution, comment
示例8: add_solution_to_existing_issue
def add_solution_to_existing_issue(issue_id, comment_content, user):
issue = Issue.objects.get(pk=issue_id)
solution = get_or_none(Solution, issue=issue, programmer=user)
if(solution):
_throwIfSolutionInProgress(solution, user, 'add solution')
solution.reopen()
else:
solution = Solution.newSolution(issue, user)
solution.save()
comment = None
if(comment_content):
comment = IssueComment.newComment(issue, user, comment_content)
comment.save()
notifySponsors_workbegun(solution, comment)
return issue
示例9: add_solution_to_existing_issue
def add_solution_to_existing_issue(issue_id, comment_content, user):
issue = Issue.objects.get(pk=issue_id)
issue.touch()
solution = get_or_none(Solution, issue=issue, programmer=user)
if(solution):
_throwIfSolutionInProgress(solution, user, 'add solution')
solution.reopen()
else:
solution = Solution.newSolution(issue, user)
solution.save()
comment = None
if(comment_content):
comment = IssueComment.newComment(issue, user, comment_content)
comment.save()
watches = watch_services.find_issue_watches(solution.issue)
notifyWatchers_workbegun(solution, comment, watches)
return issue
示例10: add_solution_to_existing_issue
def add_solution_to_existing_issue(issue_id, comment_content, accepting_payments, user):
issue = Issue.objects.get(pk=issue_id)
solution = get_or_none(Solution, issue=issue, programmer=user)
if(solution):
_throwIfSolutionInProgress(solution, user, 'add solution')
solution.reopen(accepting_payments)
else:
solution = Solution.newSolution(issue, user, accepting_payments)
solution.save()
issue.update_redundant_fields();
comment = None
if(comment_content):
comment = IssueComment.newComment(issue, user, comment_content)
comment.save()
watches = watch_services.find_issue_and_project_watches(solution.issue)
notifyWatchers_workbegun(solution, comment, watches)
if(accepting_payments):
notifyWatchers_acceptingpayments(solution, watches)
return solution, comment