📜  默认排序 django - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:33.185000             🧑  作者: Mango

代码示例1
# There is no default ordering by default
# To add one, specify `ordering` in `YourModel.Meta`

class Table(models.Model):
    ...
    class Meta:
        ordering = ['name']