Sweet, looks like your code is working! You’re still seeing the ‘2’ and that the type of product_id is a string because your print statements are placed before you convert product_id into an int and then use it to search for product_obj.
The evidence that it’s working is that it didn’t raise an error this time and then you see the POST and GET requests successfully completed with response codes 302 (return redirect to /carts) and 200 (return render...). -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/cf4d348f-9955-43f4-81b9-a4cbc98bb8b0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.