Add: items per page option to user profiles

This commit is contained in:
Aroy-Art 2024-06-23 17:02:14 +02:00
parent 78d367337d
commit e8746f9e47
Signed by: Aroy
GPG key ID: DB9689E9391DD156

View file

@ -16,8 +16,15 @@ class UserProfile(models.Model):
("S", "Show"),
]
ITEMS_PER_PAGE = [
(24, "24"),
(48, "48"),
(72, "72"),
]
user = models.OneToOneField(User, on_delete=models.CASCADE, primary_key=True, unique=True)
show_mature = models.CharField(max_length=2, choices=MATURE, default=MATURE[0][0])
items_per_page = models.IntegerField(choices=ITEMS_PER_PAGE, default=ITEMS_PER_PAGE[0][0])
class Meta:
verbose_name = _("User Profile")