Q. Which method in Django model is called before saving?

  • (A) on_save()
  • (B) before_save()
  • (C) clean()
  • (D) validate()
πŸ’¬ Discuss
βœ… Correct Answer: (C) clean()
Explanation: `clean()` is called to validate and clean fields before saving.
Explanation by: Mr. Dubey
`clean()` is called to validate and clean fields before saving.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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