拥有QuerySet对象
Input::get('filename')
但有错误
userorder = UserOrder.objects.filter(
user_id=user_id, is_closed=0)
response_data['uo'] = serializers.serialize('json', [ userorder, ])
[07 / Feb / 2017 05:13:02]" POST / ajax_response / HTTP / 1.1" 500 15833
想让json对象在客户端与他一起工作
答案 0 :(得分:0)
我认为queryset.values()
是您所需要的(note it is already a list):
response_data['uo'] = serializers.serialize('json', userorder.values())