Example #1
0
def download_artifact(request, job_number, artifact_id):
    """
    Sends an Artifact for download.
    """
    artifact = get_object_or_404(Artifact.objects.accessible_to_user(
        request.user),
                                 pk=artifact_id)
    return send_file(artifact.get_file_filename())
Example #2
0
def download_invoice(request, invoice_number):
    """
    Sends the PDF associated with the given Invoice for download.
    """
    invoice = get_object_or_404(Invoice, number=invoice_number)
    return send_file(invoice.get_pdf_filename())
Example #3
0
def download_artifact(request, job_number, artifact_id):
    """
    Sends an Artifact for download.
    """
    artifact = get_object_or_404(Artifact.objects.accessible_to_user(request.user), pk=artifact_id)
    return send_file(artifact.get_file_filename())
Example #4
0
def download_invoice(request, invoice_number):
    """
    Sends the PDF associated with the given Invoice for download.
    """
    invoice = get_object_or_404(Invoice, number=invoice_number)
    return send_file(invoice.get_pdf_filename())