tum 11 meses atrás
pai
commit
3470aead3f
2 arquivos alterados com 3 adições e 2 exclusões
  1. 2 1
      app/report/gen_report.py
  2. 1 1
      app/report/views.py

+ 2 - 1
app/report/gen_report.py

153
     unchecked_image_path = "/app/report/checkbox_unchecked.jpg"  # Path to the unchecked checkbox image
153
     unchecked_image_path = "/app/report/checkbox_unchecked.jpg"  # Path to the unchecked checkbox image
154
 
154
 
155
     # Load the template workbook
155
     # Load the template workbook
156
+    print("before load workbook {template_file}")
156
     workbook = load_workbook(template_file)
157
     workbook = load_workbook(template_file)
157
-
158
+    print("after load")
158
     # Remove sheets not in selected_sheets
159
     # Remove sheets not in selected_sheets
159
     for sheet_name in workbook.sheetnames:
160
     for sheet_name in workbook.sheetnames:
160
         if sheet_name not in selected_sheets:
161
         if sheet_name not in selected_sheets:

+ 1 - 1
app/report/views.py

260
                 return render(request, 'report/coi.html', {'result': first_result, 
260
                 return render(request, 'report/coi.html', {'result': first_result, 
261
                                                            'pcs':pcs, 
261
                                                            'pcs':pcs, 
262
                                                            'size_str': size_str,
262
                                                            'size_str': size_str,
263
-                                                           'spec': spec})
263
+                                                           'spec': spec, 'users': users, 'SHEET_NAMES': SHEET_NAMES})
264
 
264
 
265
         messages.success(request, "Request Sent")
265
         messages.success(request, "Request Sent")
266
         return redirect(request.path_info)
266
         return redirect(request.path_info)