Which of the following is NOT true about Django's F object?
Correct answer
C. It can only be used with integer fields
16 views
C. It can only be used with integer fields
16 views
The false statement is that F objects can only be used with integer fields. F() can reference any model field — numbers, dates, strings.
The other statements are true: it refers to field values inside queries, supports arithmetic, and avoids race conditions because the update happens in the database.
Want more practice? Try the full set of Computer Science MCQs on MCQsExam.com.
Not sure why the answer is C? Ask here and get an explanation.