from django.contrib.auth.models import User from django.db import models class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, primary_key=True) display_name = models.CharField(max_length=150, null=False) def __str__(self): return '{} ({})'.format(self.display_name, self.user)