You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
380 B
11 lines
380 B
from django.db import models
|
|
from django.contrib.auth.models import User
|
|
|
|
class Profile(models.Model):
|
|
user = models.OneToOneField(User, on_delete=models.CASCADE, related_name='profile')
|
|
first_name = models.CharField(max_length=100)
|
|
last_name = models.CharField(max_length=100)
|
|
email = models.EmailField()
|
|
|
|
def __str__(self):
|
|
return self.user.username
|
|
|