How to get the id of an entry based on the name in Django?

i have created the following model in Django to store my groups in a database:

class Group(models.Model):
    name = models.CharField(max_length=1000)

now i would like to get the id of a group by its name in my How do I do that? with the Group.objects.get() method i can filter by name, but there i get the whole row without the id

You can query like this:

Back to Top