In order to view all the items from your database, you can make use of the ‘all()’ function in your interactive shell as follows:
XYZ.objects.all() where XYZ is some class that you have created in your models
To filter out some element from your database, you either use the get() method or the filter method as follows:
Programming & Frameworks Training
XYZ.objects.filter(pk=1)
XYZ.objects.get(id=1)