Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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