position = models.IntegerField(default=0)
class Meta:
- ordering = ['name']
+ ordering = ('position', 'name',)
verbose_name, verbose_name_plural = _('button group'), _('button groups')
def __unicode__(self):
label = models.CharField(max_length=32)
slug = models.SlugField()
tag = models.CharField(max_length=128)
- key = models.IntegerField(blank=True, null=True)
+ key = models.CharField(blank=True, max_length=1)
position = models.IntegerField(default=0)
group = models.ManyToManyField(ButtonGroup)
class Meta:
- ordering = ['label']
+ ordering = ('position', 'label',)
verbose_name, verbose_name_plural = _('button'), _('buttons')
def __unicode__(self):
return self.label
+