Django 6 · ORM queries

Get one object

Fetch a single object. It raises DoesNotExist or MultipleObjectsReturned otherwise.

Post.objects.get(pk=1)

Official Django 6 documentation

More orm queries commands

All orm queries commands · Django 6 cheatsheet

Was this page helpful?