Example #1
0
def addSolution(request):
    """Start working on this issue"""
    issue_id = int(request.POST['issue_id'])
    comment_content = request.POST['comment']
    accepting_payments = request.POST.has_key('accept_payments')
    solution, comment = issue_services.add_solution_to_existing_issue(
        issue_id, comment_content, accepting_payments, request.user)
    watch_services.watch_issue(request.user, solution.issue.id,
                               Watch.STARTED_WORKING)
    ActionLog.log_start_work(solution=solution, issue_comment=comment)
    need_bitcoin_address = _need_to_set_bitcoin_address(
        request.user, solution.issue)
    need_verify_paypal = _need_to_verify_paypal_account(
        request.user, solution.issue)
    if need_bitcoin_address:
        msg = """You just began working on an issue with a Bitcoin offer.
You need to configure a Bitcoin address on your user profile, otherwise the sponsor will not be able to pay his offer to you.
You can set your bitcoin address in your 'edit profile' page."""
        messages.error(request, msg)
    if need_verify_paypal:
        msg = """You just began working on an issue with an offer in USD.
FS has detected that the email '%s' is not associated with a verified Paypal account.
You need to have a verified Paypal account before you can receive payments through Paypal.""" % request.user.getUserInfo(
        ).paypalEmail
        messages.error(request, msg)
    return redirect(solution.issue.get_view_link())
def addSolution(request):
    """Start working on this issue"""
    issue_id = int(request.POST['issue_id'])
    comment_content = request.POST['comment']
    issue = issue_services.add_solution_to_existing_issue(issue_id, comment_content, request.user)
    watch_services.watch_issue(request.user, issue.id, IssueWatch.STARTED_WORKING)
    return redirect(issue.get_view_link())
def addSolution(request):
    """Start working on this issue"""
    issue_id = int(request.POST["issue_id"])
    comment_content = request.POST["comment"]
    accepting_payments = request.POST.has_key("accept_payments")
    solution, comment = issue_services.add_solution_to_existing_issue(
        issue_id, comment_content, accepting_payments, request.user
    )
    watch_services.watch_issue(request.user, solution.issue.id, Watch.STARTED_WORKING)
    ActionLog.log_start_work(solution=solution, issue_comment=comment)
    need_bitcoin_address = _need_to_set_bitcoin_address(request.user, solution.issue)
    need_verify_paypal = _need_to_verify_paypal_account(request.user, solution.issue)
    if need_bitcoin_address:
        msg = """You just began working on an issue with a Bitcoin offer.
You need to configure a Bitcoin address on your user profile, otherwise the sponsor will not be able to pay his offer to you.
You can set your bitcoin address in your 'edit profile' page."""
        messages.error(request, msg)
    if need_verify_paypal:
        msg = (
            """You just began working on an issue with an offer in USD.
FS has detected that the email '%s' is not associated with a verified Paypal account.
You need to have a verified Paypal account before you can receive payments through Paypal."""
            % request.user.getUserInfo().paypalEmail
        )
        messages.error(request, msg)
    return redirect(solution.issue.get_view_link())
def addSolution(request):
    """Start working on this issue"""
    issue_id = int(request.POST["issue_id"])
    comment_content = request.POST["comment"]
    accepting_payments = request.POST.has_key("accept_payments")
    issue = issue_services.add_solution_to_existing_issue(issue_id, comment_content, accepting_payments, request.user)
    watch_services.watch_issue(request.user, issue.id, IssueWatch.STARTED_WORKING)
    return redirect(issue.get_view_link())
Example #5
0
def addSolution(request):
    """Start working on this issue"""
    issue_id = int(request.POST['issue_id'])
    comment_content = request.POST['comment']
    issue = issue_services.add_solution_to_existing_issue(issue_id, comment_content, request.user)
    return redirect(issue.get_view_link())