python-zappa

Django AJAX Request Only Getting Last Element (not getlist issue)

房东的猫 提交于 2019-12-11 16:12:13
问题 I'm trying to make a tagging system in Django. Basically I'm passing through a list of tags (checkboxes in a form) through AJAX to a Django view which will update the list of tags with a new selection of relevant tags in an httpresponse. The problem is that Django only seems to be receiving the last element of the list on its own even after getlist. In fact, if I print the entire request.GET, it shows just one element in each list. The javascript/jQuery code is here: $(document).on('change',