user profile

parent 669564ce
......@@ -32,13 +32,18 @@ USERS_PATH = config['PATHS']['PATH_USERS']
def report_L2ASCL(request, report, purchase_id):
reporteDir = report.replace('_sclData', '')
##########################################
# Generador de pdfs #
##########################################
PDFGenerator(request, reporteDir, purchase_id)
##########################################
# Generador de pdfs #
##########################################
path = USERS_PATH + request.user.email + '/' + purchase_id + '/'
if os.path.isfile(path + reporteDir + '.pdf'):
pass
else:
##########################################
# Generador de pdfs #
##########################################
PDFGenerator(path, reporteDir)
##########################################
# Generador de pdfs #
##########################################
image_path = request.user.email + "/" + purchase_id + "/" + "out/" + reporteDir + "/TCI/thumbnails/"
SCL_path = request.user.email + "/" + purchase_id + "/" + "out/" + reporteDir + "/SCL/"
......@@ -179,7 +184,7 @@ def Reports(request):
print("folder out noes not exists")
else:
folders = os.listdir(absolute_path)
if len(folders) == 0:
initial_folder = "../#"
else:
......@@ -282,7 +287,7 @@ def wsProcessProgress(request):
# result.get()
# return render_to_response('reports_table.html', {"result": result.get()})
def PDFGenerator(request, reporteDir, purchase_id):
def PDFGenerator(path, reporteDir):
class PDF(FPDF):
def header(self):
......@@ -340,5 +345,5 @@ def PDFGenerator(request, reporteDir, purchase_id):
for i in range(1, 5):
pdf.imagenes()
path = USERS_PATH + request.user.email + '/' + purchase_id + '/'
pdf.output(path + reporteDir + '.pdf', 'F')
\ No newline at end of file
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