X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/4419f93a01685b9864a6e78cb905c803ec0970b0..d00fdcaf7bba586060d69f3526347dc19d711a19:/apps/toolbar/models.py diff --git a/apps/toolbar/models.py b/apps/toolbar/models.py index 004fde9f..d1f4952c 100644 --- a/apps/toolbar/models.py +++ b/apps/toolbar/models.py @@ -19,8 +19,9 @@ class Button(models.Model): slug = models.SlugField(unique=True) #unused # behaviour - params = models.TextField() # TODO: should be a JSON field - scriptlet = models.ForeignKey('Scriptlet') + params = models.TextField(default='[]') # TODO: should be a JSON field + scriptlet = models.ForeignKey('Scriptlet', null=True, blank=True) + link = models.CharField(max_length=256, blank=True, default='') # ui related stuff key = models.CharField(blank=True, max_length=1) @@ -32,7 +33,7 @@ class Button(models.Model): group = models.ManyToManyField(ButtonGroup) class Meta: - ordering = ('label',) + ordering = ('slug',) verbose_name, verbose_name_plural = _('button'), _('buttons') def hotkey_code(self):