fetch json array from mysql django

Solutions on MaxInterview for fetch json array from mysql django by the best coders in the world

showing results for - "fetch json array from mysql django"
Yannis
20 Jun 2019
1#djanfo #myswl #json
2fetch json array from django mysql 
3--------------------------------
4def home(request): 
5    result = <model name>.objects.values()     
6    return HttpResponse(json.dumps(list(result)))