From e8746f9e47567a50948aec53aa9830b7d061a5ba Mon Sep 17 00:00:00 2001 From: Aroy-Art Date: Sun, 23 Jun 2024 17:02:14 +0200 Subject: [PATCH] Add: items per page option to user profiles --- archivist/apps/user/models.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/archivist/apps/user/models.py b/archivist/apps/user/models.py index aa38504..9297812 100644 --- a/archivist/apps/user/models.py +++ b/archivist/apps/user/models.py @@ -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")