Django automatically creates an id field as primary key.
Now I need to get the object by this id.
object = Class.objects.filter()
How
You can also use get_object_or_404 django shortcut. It raises a 404 error if object is not found.