コード例 #1
0
def sticker(request, pk=None):
    response = HttpResponse(content_type='application/pdf; charset=utf-8')
    supply = Supply.objects.get(pk=pk)
    pdf = Sticker(code="DRS-{0}".format(supply.id), description=supply.description)
    pdf.create(response)

    return response
コード例 #2
0
def sticker(request, pk=None):
    response = HttpResponse(content_type='application/pdf; charset=utf-8')
    supply = Supply.objects.get(pk=pk)
    pdf = Sticker(code="DRS-{0}".format(supply.id), description=supply.description)
    pdf.create(response)

    return response
コード例 #3
0
def sticker(request, pk=None):
    response = HttpResponse(content_type='application/pdf; charset=utf-8')
    equipment = Equipment.objects.get(pk=pk)
    pdf = Sticker(code="DRE-{0}".format(equipment.id), 
                  description="{0} ({1})".format(equipment.description, (equipment.brand or "").capitalize()))
    pdf.create(response)
    
    return response
コード例 #4
0
def sticker(request, pk=None):
    response = HttpResponse(content_type='application/pdf; charset=utf-8')
    equipment = Equipment.objects.get(pk=pk)
    pdf = Sticker(code=u"DRE-{0}".format(equipment.id), 
                  description=u"{0} ({1})".format(equipment.description, (equipment.brand or "").capitalize()))
    pdf.create(response)
    
    return response