Explain the difference between Q and F objects.
Last updated
Qobjects compose query conditions with&(AND),|(OR),~(NOT). They are needed for OR logic that keyword filters can't express.Fobjects reference a field's value inside the database, letting you compare fields or update a field from its own value.Because
Farithmetic runs in SQL, updates like incrementing a counter are atomic and avoid race conditions.