Get django object id based on model attribute September 25, 2023 by Tarik Like this: place = Places.objects.get(name="kansas") print(place.id)