订单不起作用

时间:2013-08-27 08:43:54

标签: django python-2.6 django-1.4

我想通过'type'来查看dict。之后我会订购超过类型。
但我没有给出任何结果。

视图中的代码:

  substance = Substance.objects.filter(sub__study = study, d__isnull = False).order_by('type');

如果我将此代码添加到模板中,则可以使用:

{% for tp in treatment_periods_list|dictsort:"treatment_item_type" %}

为什么会发生这种情况的任何想法?

0 个答案:

没有答案