Commit d5f0769c authored by irving's avatar irving

Cambiado nombre de pdf generado

parent 9c1c5dd9
......@@ -250,7 +250,7 @@
{% endif %}
class="btn btn-info btn-sm col-md-4 col-xs-4 col-sm-4 col-lg-4 col-xl-4"
target="_blank"
download="{{ product.search_name }} ({{ product.purchase_date }}).pdf">
download="{{ product.pdf_name }}">
<i class="fa fa-file-pdf-o"></i>
</a>
<!--a title="View Log" href="#" class="btn btn-info"
......
......@@ -212,6 +212,9 @@ def Reports(request):
if os.path.getsize(USERS_PATH + producto['user__email'] + "/" + str(producto['id']) + "/scl_data.json") > 3:
Data = True
pdfName = producto['name'].replace(",", "").replace(" ", "_")+"_"+producto['aggreg_date'].strftime('%Y-%m-%d-%H:%M:%S')+".pdf"
print(pdfName)
productList.append({
"search_name": producto['name'],
"description": producto['description'],
......@@ -229,6 +232,7 @@ def Reports(request):
"polygon": polygon['wkt'],
"is_public": producto['is_public'],
"scl_data": Data,
"pdf_name": pdfName
})
size = 0
final_size = 0
......
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