How do I programmatically get the ordering
defined in model.Meta
for a Django model class
or an instance?
i.e. I want to get the ('foo', 'bar')
from:
class FooBar(models.Model):
foo = models.IntegerField()
bar = models.IntegerField()
snake = models.CharField(max_length=128)
class Meta:
ordering = ('foo', 'bar')
Neither models.FooBar
nor models.FooBar.Meta
have an attribute ordering