當前位置: 首頁>>代碼示例>>Python>>正文


Python models.IssueComment類代碼示例

本文整理匯總了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
開發者ID:kinow,項目名稱:www.freedomsponsors.org,代碼行數:7,代碼來源:comment_services.py

示例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
開發者ID:Bigua,項目名稱:www.freedomsponsors.org,代碼行數:8,代碼來源:comment_services.py

示例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
開發者ID:kinow,項目名稱:www.freedomsponsors.org,代碼行數:12,代碼來源:issue_services.py

示例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
開發者ID:kinow,項目名稱:www.freedomsponsors.org,代碼行數:12,代碼來源:issue_services.py

示例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
開發者ID:henriquebastos,項目名稱:www.freedomsponsors.org,代碼行數:13,代碼來源:issue_services.py

示例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
開發者ID:JhonatasMartins,項目名稱:www.freedomsponsors.org,代碼行數:13,代碼來源:issue_services.py

示例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
開發者ID:loomchild,項目名稱:www.freedomsponsors.org,代碼行數:14,代碼來源:issue_services.py

示例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
開發者ID:kinow,項目名稱:www.freedomsponsors.org,代碼行數:15,代碼來源:issue_services.py

示例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
開發者ID:jarlarntzen,項目名稱:www.freedomsponsors.org,代碼行數:17,代碼來源:issue_services.py

示例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
開發者ID:loomchild,項目名稱:www.freedomsponsors.org,代碼行數:19,代碼來源:issue_services.py


注:本文中的core.models.IssueComment類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。