added support for user profiles

This commit is contained in:
Edward Tirado Jr 2025-07-08 00:39:58 -05:00
parent eeb74027eb
commit 1f314f1c20
8 changed files with 137 additions and 32 deletions

View file

@ -1,3 +1,12 @@
from django.contrib.auth.models import User
from django.db import models
# Create your models here.
class UserProfile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
name = models.CharField(max_length=100, null=True, blank=True)
@property
def lists(self):
return self.user.movielist_set.all()