1
def db_data(request):
    grid_data = list(table_name.objects.all().values())
    return JsonResponse(grid_data, safe=False)

I am hitting above endpoint which gives list of dictionaries as response. Is there a way where I can convert this back to Queryset object at the receiver side so that I can perform ORM operations on this queryset object.

Mahesh
  • 1,117
  • 2
  • 23
  • 42
  • *"at the receiver side so that I can perform ORM operations"*, In your case what/who will be the *"receiver"*? – JPG Aug 25 '20 at 15:32
  • is it this which you are looking for @mahesh https://stackoverflow.com/questions/5350846/generate-a-django-queryset-based-on-dict-keys – Achintya Ranjan Chaudhary Aug 25 '20 at 15:37
  • **db_data** would be hosted on server1. `receiver would hit db_data and get the response in server2` – Mahesh Aug 25 '20 at 15:37

0 Answers0