如何以编程方式获取Django 模型或实例的ordering
定义?model.Meta
class
即我想('foo', 'bar')
从:
class FooBar(models.Model):
foo = models.IntegerField()
bar = models.IntegerField()
snake = models.CharField(max_length=128)
class Meta:
ordering = ('foo', 'bar')
既没有models.FooBar
也models.FooBar.Meta
没有属性ordering