Django automatically creates an id field as primary key.
Now I need to get the object by this id.
object = Class.objects.filter()
How
If you want to get an object, using get() is more straightforward:
get()
obj = Class.objects.get(pk=this_object_id)