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

Add description field

This commit is contained in:
Oliver Walters
2019-09-15 23:07:45 +10:00
parent 02e71bd2ce
commit 098cd0ec44
2 changed files with 26 additions and 1 deletions

View File

@ -62,10 +62,12 @@ class InvenTreeSetting(models.Model):
setting.value = value
setting.save()
key = models.CharField(max_length=50, blank=False, unique=True, help_text=_('Settings key'))
key = models.CharField(max_length=50, blank=False, unique=True, help_text=_('Settings key (must be unique - case insensitive'))
value = models.CharField(max_length=200, blank=True, unique=False, help_text=_('Settings value'))
description = models.CharField(max_length=200, blank=True, unique=False, help_text=_('Settings description'))
def validate_unique(self, exclude=None):
""" Ensure that the key:value pair is unique.
In addition to the base validators, this ensures that the 'key'