[ADD] User setting to keep the sidebar menu minimized

This commit is contained in:
Peter Pfeufer
2025-10-15 01:13:42 +02:00
parent 92a1bd40a3
commit 295361a541
9 changed files with 122 additions and 3 deletions

View File

@@ -97,7 +97,8 @@ class UserProfile(models.Model):
on_delete=models.SET_DEFAULT,
default=get_guest_state_pk)
language = models.CharField(
_("Language"), max_length=10,
_("Language"),
max_length=10,
choices=Language.choices,
blank=True,
default='')
@@ -112,6 +113,12 @@ class UserProfile(models.Model):
null=True,
help_text="Bootstrap 5 Themes from https://bootswatch.com/ or Community Apps"
)
minimize_sidebar = models.BooleanField(
_("Minimize Sidebar Menu"),
default=False,
help_text=_("Keep the sidebar menu minimized")
)
def assign_state(self, state=None, commit=True):
if not state: