data: {
product_id: $(this).data('index'),
product_quantity: $('#select' + theproductid + ' option:selected').text(),
csrfmiddlewaretoken:"{{csrf_token}}",
action:'post'
},
why in product_quantity where i used option selected i have to put space before option because if i don't put space it show this error
product_quantity = int(request.POST.get('product_quantity'))
ValueError: invalid literal for int() with base 10: ''
can anyone explain.