im trying to generate a pdf that will contain one pallet barcode with the items barcodes under that pallet. the issue is happening when the pallet contain big number of items under it the call is taking around 1.7 min and then timing out. My django view :`class XivaAllBarcodeWeasyTemplateView(WeasyTemplateResponseMixin, DetailView): template_name = 'invoices/barcode_all_pallet.html'
def get_object(self):
try:
return PurchasePallet.objects.get(pk=self.kwargs.get("pk"))
except PurchasePallet.DoesNotExist:
raise Http404("Not found")
def get_context_data(self, **kwargs: Any) -> Dict[str, Any]:
context = super().get_context_data(**kwargs)
size_unit_dict = {'1': 'KG', '2': 'LB'}
context['size_unit_dict'] = size_unit_dict
return context
`