我不得不在django应用程序中按日期显示条目,但我有点受阻:以下是我的模型的一个示例: name = models.CharFieldHere's the problem : I would like to show that field in my template and be able to sort it with django-sortingDjango-sorting使用{%锚点arg %}来完成,但我不知道如何管理其中的字段...你会怎么做?
提前感
我有一个SQL查询,如下所示: select * from results_table order by case
when place = 0 then 1 else 0 end, place此查询首先对正数进行排序,然后对零进行排序。我怎么用Django写这篇文章呢?我需要为每个查询编写注释。有没有办法为每个查询集编写注释?