S

Shyam Dubey • 3.70K Points
Extraordinary

Q. How can you define a one-to-one relationship in Django?

  • (A) models.OneToManyField
  • (B) models.ForeignKey(unique=True)
  • (C) models.OneToOneField
  • (D) models.SingleRelationField
  • Correct Answer - Option(C)
  • Views: 15
  • Filed under category Django
  • Hashtags:

Explanation by: Shyam Dubey
OneToOneField defines a one-to-one relationship between two models.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.