15 lines
484 B
Python
15 lines
484 B
Python
from django.db import models
|
|
# Create your models here.
|
|
|
|
from django.contrib.auth.models import User
|
|
|
|
class UserProfile(models.Model):
|
|
user = models.OneToOneField(User, on_delete=models.CASCADE)
|
|
# Add custom fields here
|
|
bio = models.TextField(blank=True)
|
|
birthdate = models.DateField(null=True, blank=True)
|
|
profile_picture = models.ImageField(upload_to='profile_pics/', null=True, blank=True)
|
|
|
|
def __str__(self):
|
|
return f'{self.user.username} Profile'
|