📜  从 mysql django 获取 json 数组 - Python 代码示例

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

代码示例1
#djanfo #myswl #json
fetch json array from django mysql 
--------------------------------
def home(request): 
    result = .objects.values()     
    return HttpResponse(json.dumps(list(result)))