A

Admin • 833.24K Points
Coach

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
  • Correct Answer - Option(C)
  • Views: 32
  • Filed under category Django
  • Hashtags:

Explanation by: Admin

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.