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)
group = models.ManyToManyField(ButtonGroup)
class Meta:
- ordering = ('label',)
+ ordering = ('slug',)
verbose_name, verbose_name_plural = _('button'), _('buttons')
def hotkey_code(self):