mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
models.py: minor branch tweaks
Make minor (non-structural) improvements to the model, mostly for the benefit of the admin interface: * Set default ordering so that branches appear in the same order they do in the user-facing drop-down * Include the description in the default string representation (so you know which branch name matches with which Yocto Project version, in the OE index). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
128f86adfc
commit
b91b09a0ae
|
@ -42,9 +42,13 @@ class Branch(models.Model):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name_plural = "Branches"
|
verbose_name_plural = "Branches"
|
||||||
|
ordering = ['sort_priority']
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
if self.short_description:
|
||||||
|
return '%s (%s)' % (self.name, self.short_description)
|
||||||
|
else:
|
||||||
|
return self.name
|
||||||
|
|
||||||
|
|
||||||
class Update(models.Model):
|
class Update(models.Model):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user