Add: UserProfile model

This commit is contained in:
Aroy-Art 2025-01-28 22:06:23 +01:00
parent aeb8e2842d
commit c86fbb8362
Signed by: Aroy
GPG key ID: 583642324A1D2070

View file

@ -1,2 +1,15 @@
from django.db import models
from django.contrib.auth.models import User
class UserProfile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, unique=True)
show_mature = models.BooleanField(default=False)
class Meta:
verbose_name = "User Profile"
verbose_name_plural = "User Profiles"
def __str__(self):
return self.user.username