πŸ“Š Django
Q. What is the output of str() method in a Django model?
  • (A) It returns the model's primary key
  • (B) It returns the model class name
  • (C) It returns a string representation of the model instance
  • (D) It returns the ID of the model
πŸ’¬ Discuss
βœ… Correct Answer: (C) It returns a string representation of the model instance

Explanation: The str method returns a human-readable representation of a model instance.

Explanation by: Rakesh Yadav
The str method returns a human-readable representation of a model instance.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
50
Total Visits
πŸ“½οΈ
11 mo ago
Published
πŸŽ–οΈ
Rakesh Yadav
Publisher
πŸ“ˆ
96%
Success Rate