📜  django serialize a get object is not iterable - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:18.689000             🧑  作者: Mango

代码示例1
def get_AJAX(request, id):
    data = serializers.serialize("json", [Template.objects.get(pk=id)])
    return HttpResponse(data)