Chrome Extension

Retrieving all objects in Django

all_entries = Entry.objects.all();
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool

If you want to retrieve all objects in Django, you can use the above query set. For example, if there is a Model named as 'Person' and it has fields like first_name and last_name and you want to get all entries made in this table then you can use below query set.

Person.objects.all()
Was this helpful?
0 Comments