Why is django context a string when returned to template?

I’m sending data (id of the selected option from a drop-down) back to my views using some ajax: $.ajax({ type: “GET”, data: {‘customer_select’: selected_data }, success: function(data){ console.log(data) } }); I handle it in my class-based view in get_context_data(): def get_context_data(self, **kwargs): … if ‘customer_select’ in self.request.GET: customer_id = self.request.GET[‘customer_select’] context[‘new_customer_id’] = customer_id return context…

Details