Esempio n. 1
0
    def handle(self, *args, **options):
        if len(args) < 2:
            raise CommandError("usage: labels <repo> <release name>")

        repo = Repo.objects.get(name=args[0])
        release = Release.objects.get(name=args[1])
        generateLabelSpreadsheet(repo, release.id)
Esempio n. 2
0
    def handle(self, *args, **options):
        if len(args) < 2:
            raise CommandError('usage: labels <repo> <release name>')

        repo = Repo.objects.get(name=args[0])
        release = Release.objects.get(name=args[1])
        generateLabelSpreadsheet(repo, release.id)
Esempio n. 3
0
def export_labels_form(request):
    release_id = request.GET.get("release_id")
    branch_id = request.GET.get("branch_id")
    if branch_id is None or len(branch_id) == 0:
        return release(request, release_id)

    branch = Branch.objects.get(id=branch_id)
    ssfile = labels.generateLabelSpreadsheet(branch, release_id)
    response = HttpResponse(ssfile, content_type="application/xls")
    response["Content-Disposition"] = 'attachment; filename="%s_labels.xls"' % branch.name
    return response
Esempio n. 4
0
def export_labels_form(request):
    release_id = request.GET.get('release_id')
    branch_id = request.GET.get('branch_id')
    if branch_id is None or len(branch_id) == 0:
        return release(request, release_id)

    branch = Branch.objects.get(id=branch_id)
    ssfile = labels.generateLabelSpreadsheet(branch, release_id)
    response = HttpResponse(ssfile, content_type='application/xls')
    response[
        'Content-Disposition'] = 'attachment; filename="%s_labels.xls"' % branch.name
    return response