Q. Which Django ORM method returns a single object or raises DoesNotExist?

  • (A) get()
  • (B) filter()
  • (C) all()
  • (D) search()
πŸ’¬ Discuss
βœ… Correct Answer: (A) get()
Explanation: `get()` fetches a single object or raises `DoesNotExist` exception if not found.
Explanation by: Mr. Dubey
`get()` fetches a single object or raises `DoesNotExist` exception if not found.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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