2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 20:20:58 +00:00

Renamed Theme to ColorTheme, ColorTheme is now a per-user selection

This commit is contained in:
eeintech
2020-09-07 16:27:23 -05:00
parent 2e5ec5d249
commit 10dd8fad80
8 changed files with 56 additions and 39 deletions

View File

@ -156,15 +156,16 @@ class Currency(models.Model):
super().save(*args, **kwargs)
class Theme(models.Model):
class ColorTheme(models.Model):
""" Color Theme setting """
class ThemeChoices(models.TextChoices):
class ColorThemeChoices(models.TextChoices):
DEFAULT = '', _('Default')
DARKER = '-darker', _('Darker')
theme = models.CharField(max_length=20,
choices=ThemeChoices.choices,
default=ThemeChoices.DEFAULT,
blank=True)
name = models.CharField(max_length=20,
choices=ColorThemeChoices.choices,
default=ColorThemeChoices.DEFAULT,
blank=True)
user = models.CharField(max_length=150)