Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- kolvo=dict(request.POST).get("kolvo")
- nak_id=request.GET.get("n")
- try:
- kolvo=[float(k.replace(",",".")) for k in kolvo]
- except ValueError:
- return redirect(f"/accounts/profile/zagot/accept_products?n={nak_id}&e=1")
- zagot_products=Zagot_products.objects.filter(......).order_by("product")
- for i in range(len(kolvo)):
- zagot_products[i].kolvo=kolvo[i]
- zagot_products[i].status=True
- zagot_products[i].save()
- Nakl_for_zagot.objects.filter(.....).update(is_taken=True)
- return redirect("/accounts/profile/")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement