Q. What is the use of `null=True` in Django model fields?

  • (A) Field stores NULL in database if left empty
  • (B) Field cannot be used
  • (C) Field will be automatically set to zero
  • (D) Field is ignored by admin
πŸ’¬ Discuss
βœ… Correct Answer: (A) Field stores NULL in database if left empty
Explanation: `null=True` allows storing NULL in the database for that field.
Explanation by: Mr. Dubey
`null=True` allows storing NULL in the database for that field.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
101
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
83%
Success Rate