Revision d3eeac81
Added by Mikaël Ates over 11 years ago
calebasse/ressources/models.py | ||
---|---|---|
448 | 448 |
code = models.IntegerField(verbose_name=u"Code") |
449 | 449 |
axe = models.IntegerField(verbose_name=u"Axe", choices=AXIS, |
450 | 450 |
max_length=1) |
451 |
ordering_code = models.CharField(max_length=20, blank=True, null=True, |
|
452 |
verbose_name=u"Classification") |
|
451 | 453 |
|
452 | 454 |
def __unicode__(self): |
453 |
return "%d %s" % (self.code, self.name)
|
|
455 |
return "%s %s" % (self.ordering_code, self.name)
|
|
454 | 456 |
|
455 | 457 |
class Meta: |
456 |
ordering = ['code'] |
|
458 |
ordering = ['ordering_code']
|
|
457 | 459 |
verbose_name = u'Code CFTMEA' |
458 | 460 |
verbose_name_plural = u'Codes CFTMEA' |
459 | 461 |
|
Also available in: Unified diff
ressources: handle specific order of CFTMEA codes.