0PricingLogin
Django Academy · Lesson

OneToOneField for Profiles

Extend a model with a paired record.

Exactly One Each Way

Sometimes a row pairs with exactly one other row, both ways. That is a one-to-one relationship, perfect for splitting data cleanly.

The Profile Pattern

The classic use is a user profile: each user gets one profile, and each profile belongs to one user. Extra fields live separately.

All lessons in this course

  1. ForeignKey and on_delete
  2. ManyToManyField and Through Models
  3. OneToOneField for Profiles
  4. related_name and Reverse Lookups
← Back to Django Academy