added user profile page
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-04-02 20:06:38 +03:00
parent b723214c86
commit 457b8c8443
9 changed files with 356 additions and 4 deletions

View File

@@ -2,6 +2,19 @@ from django.contrib.auth.models import User
from django.db import models
class UserProfile(models.Model):
DARK = 'dark'
LIGHT = 'light'
THEME_CHOICES = [(DARK, 'Dark'), (LIGHT, 'Light')]
user = models.OneToOneField(User, on_delete=models.CASCADE, related_name='profile')
display_name = models.CharField(max_length=100, blank=True)
theme = models.CharField(max_length=10, choices=THEME_CHOICES, default=DARK)
def __str__(self):
return f"Profile({self.user.username})"
class Item(models.Model):
GAMES = 'games'
BOOKS = 'books'