parchado de errores

parent 33097eed
......@@ -72,4 +72,4 @@ class Purchase(models.Model):
productList = models.TextField(verbose_name="JSON Product List")
purchased = models.BooleanField(default=False)
price = models.FloatField(default=0.0)
progress = models.IntegerField(default=0,max_length=3)
progress = models.IntegerField(default=0)
......@@ -646,7 +646,7 @@ def IPN(request):
# pass
# else:
# pass
# return redirect("https://google.com.mx")
# return redirect("https://google.com.mx")
# ------------------------------------------------------
def Registration(request):
#user = User.objects.filter(email=request.POST['email'])
......
......@@ -31,13 +31,19 @@ USERS_PATH = config['PATHS']['PATH_USERS']
def report_L2ASCL(request, report, purchase_id):
reporteDir = report.replace('_sclData','')
image_path = request.user.email + "/" + purchase_id + "/" + "out/"+reporteDir+"/TCI/thumbnails/"
absolute_path = USERS_PATH + request.user.email + "/" + purchase_id + "/out"
folders = os.listdir(path=absolute_path)
print(folders)
json_route= USERS_PATH + request.user.email + "/" + purchase_id + "/"
for file in os.listdir(path=json_route):
if file.endswith("_sclData.json") and not file.endswith("merge_out_sclData.json"):
with open(USERS_PATH + request.user.email + "/" + purchase_id + "/" + file) as f:
json_data = OrderedDict(json.load(f))
if len(json_data)==0:
if file[:6] in folders:
folders.remove(file[:6])
with open(USERS_PATH + request.user.email + "/" + purchase_id + "/findProducts.json") as p:
dataProduct = json.load(p)
......@@ -54,7 +60,6 @@ def report_L2ASCL(request, report, purchase_id):
folders.remove(reporteDir)
else:
print("lleno")
graphData = dict()
graphData['type'] = "line"
......
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