2024-02-25 00:32:15 +01:00
|
|
|
from django.contrib.auth.models import User
|
|
|
|
from django.db import models
|
|
|
|
|
|
|
|
|
2024-02-28 20:43:45 +01:00
|
|
|
class Profile(models.Model):
|
2024-02-25 00:32:15 +01:00
|
|
|
user = models.OneToOneField(User, on_delete=models.CASCADE, primary_key=True)
|
|
|
|
|
2024-02-28 13:45:21 +01:00
|
|
|
display_name = models.CharField(max_length=150, null=False)
|
2024-02-28 21:26:34 +01:00
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return '{} ({})'.format(self.display_name, self.user)
|