django忽略查询中模型定义上的排序参数
在我的模型上我有django忽略查询中模型定义上的排序参数,django,Django,在我的模型上我有 class Meta: ordering = ['title'] 有没有一种方法可以在模型定义中将其保留为在其他地方有用,但在查询中告诉它忽略它,而无需订购人?文档是您的朋友: New in Django 1.0: Please, see the release notes If you don't want any ordering to be applied to a query, not even the default ordering, call or
class Meta:
ordering = ['title']
有没有一种方法可以在模型定义中将其保留为在其他地方有用,但在查询中告诉它忽略它,而无需订购人?文档是您的朋友:
New in Django 1.0: Please, see the release notes
If you don't want any ordering to be applied to a query,
not even the default ordering, call order_by() with no parameters.