1. Home
  2. Computer Science MCQs
  3. Django
  4. Which of the following is NOT a valid field option in…

Added 28 Apr 2024

Which of the following is NOT a valid field option in Django models?

  1. default
  2. choices
  3. related_model Correct answer
  4. verbose_name

Correct answer

C. related_model

17 views

MCQSEXAM

Explanation

related_model is not a field option you can pass. default, choices and verbose_name are all valid options.

(related_model does exist as a read-only attribute on relation fields, but it is not something you set.) The option you probably want is related_name.

For more solved questions like this one, see Computer Science MCQs on MCQsExam.com.

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Django MCQs

Practise all Django MCQs

Similar MCQs