コード例 #1
0
ファイル: views.py プロジェクト: SalesforceDev/StratoSource
def export_labels_form(request):
    release_id = request.GET.get('release_id')
    repo_idlist = request.GET.getlist('repocb')
    if repo_idlist == None or len(repo_idlist) == 0:
        return release(request, release_id)

    repo = Repo.objects.get(id=repo_idlist[0])
    ssfile = labels.generateLabelSpreadsheet(repo, release_id)
    response = HttpResponse(ssfile, mimetype='application/xls')
    response['Content-Disposition'] = 'attachment; filename="%s_labels.xls"' % repo.name
    return response
コード例 #2
0
def export_labels_form(request):
    release_id = request.GET.get('release_id')
    repo_idlist = request.GET.getlist('repocb')
    if repo_idlist == None or len(repo_idlist) == 0:
        return release(request, release_id)

    repo = Repo.objects.get(id=repo_idlist[0])
    ssfile = labels.generateLabelSpreadsheet(repo, release_id)
    response = HttpResponse(ssfile, mimetype='application/xls')
    response[
        'Content-Disposition'] = 'attachment; filename="%s_labels.xls"' % repo.name
    return response
コード例 #3
0
ファイル: views.py プロジェクト: SalesforceDev/StratoSource
def export_labels_form(request):
    release_id = request.POST.get('release_id')
    if request.POST.get('cancelButton') == 'Cancel':
        return release(request, release_id)
    repo_idlist = request.POST.getlist('repocb')
    if repo_idlist == None or len(repo_idlist) != 1:
        return export_labels(request, release_id, selectionError = True)

    repo = Repo.objects.get(id=repo_idlist[0])
    ssfile = labels.generateLabelSpreadsheet(repo, release_id)
    response = HttpResponse(ssfile, mimetype='application/xls')
    response['Content-Disposition'] = 'attachment; filename="%s_labels.xls"' % repo.name
    return response


    return render_to_response('release_push_status.html', data, context_instance=RequestContext(request))
コード例 #4
0
def export_labels_form(request):
    release_id = request.POST.get('release_id')
    if request.POST.get('cancelButton') == 'Cancel':
        return release(request, release_id)
    repo_idlist = request.POST.getlist('repocb')
    if repo_idlist == None or len(repo_idlist) != 1:
        return export_labels(request, release_id, selectionError=True)

    repo = Repo.objects.get(id=repo_idlist[0])
    ssfile = labels.generateLabelSpreadsheet(repo, release_id)
    response = HttpResponse(ssfile, mimetype='application/xls')
    response[
        'Content-Disposition'] = 'attachment; filename="%s_labels.xls"' % repo.name
    return response

    return render_to_response('release_push_status.html',
                              data,
                              context_instance=RequestContext(request))