descripcion reportes

parent c54eb82d
......@@ -196,7 +196,6 @@ def wsPurchasesPM(request):
'storage':storage,
'in_process': pending.count(),
})
print (table_data)
return HttpResponse(json.dumps(table_data))
else:
raise Http404
......
......@@ -16,6 +16,7 @@ from reportlab.pdfgen import canvas
from django.views.decorators.csrf import csrf_exempt
from GeoInt_SIDT.settings import BASE_URL
from administration.views import best_unit_size
from catalog.models import Purchase
from reportlab.pdfgen.canvas import Canvas
......@@ -135,11 +136,10 @@ def Reports(request):
for p in json.loads(producto['productList']):
size = size + float(p['info']['size'][:-3])
if size > 1000:
size2 = size / 1000
final_size = str(round(size2, 2)) + " GB"
else:
final_size = str(round(size, 2)) + " MB"
size = size *1048576
final_size = best_unit_size(size)
initial_folder = "."
absolute_path = USERS_PATH + request.user.email + "/" + str(producto['id']) + "/"
......@@ -456,6 +456,8 @@ def PDFGenerator(request, ruta, reporteDir, datasets,searchInfo):
story = []
story.append(tileinfo("hola"))
# define the style for our paragraph text
styles = getSampleStyleSheet()
styles2 = getSampleStyleSheet()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment