This commit is contained in:
Herculino Trotta
2024-10-09 00:31:21 -03:00
parent e78e4cc5e1
commit 3dde44b1cd
139 changed files with 4965 additions and 1004 deletions

View File

@@ -1,4 +1,5 @@
from django.conf import settings
from django.contrib.auth import get_user_model
from django.db import models
from django.contrib.auth.models import AbstractUser, Group
from django.utils.translation import gettext_lazy as _
@@ -17,3 +18,13 @@ class User(AbstractUser):
def __str__(self):
return f"{self.first_name} {self.last_name} ({self.email})"
class UserSettings(models.Model):
user = models.OneToOneField(
get_user_model(), on_delete=models.CASCADE, related_name="settings"
)
hide_amounts = models.BooleanField(default=False)
def __str__(self):
return f"{self.user.email}'s settings"