django1.4を使用していて、下記のように、
ifequalで、フィルターが動作しないのは、1.2のアップデートで解消されたと聞いていたのですが、
1.if ==が使えないこと
2.やっぱりifequalの中で、フィルターが動作していない
という問題があるのですが、理由の分かる方がいらっしゃれば教えていただけると助かります。
<div
{% if user.email|lower == message.recipient|lower %}
class="highlight"
{% endif %}
>{{ message }}</div>
表示されているエラーとエラーの出ている箇所を送付いたします。
お手数ですがよろしくお願いいたします。
TemplateSyntaxError at /tasklinks/schedule/day/1/
Could not parse the remainder: '==' from 'schedule.start_time|
date:"H"=='
Request Method: GET
Request URL: http://localhost:8000/tasklinks/schedule/day/1/
Django Version: 1.4 pre-alpha
Exception Type: TemplateSyntaxError
Exception Value:
Could not parse the remainder: '==' from 'schedule.start_time|
date:"H"=='
Exception Location: C:\Python27\lib\site-packages\django\template
\base.py in __init__, line 503
Python Executable: C:\Python27\python.exe
Python Version: 2.7.1
Python Path:
Template error
In template tasklinks\templates\tasklink\day2.html, error at line 26
Could not parse the remainder: '==' from 'schedule.start_time|
date:"H"=='
16
17
18 <div data-role="contents" id="scheduleday" >
19
20 <ul data-role="listview" >
21 <li data-role="list-divider" > {% now "F d " %}日の予定 </li>
22 {% for t in hour_list %}
23 <li><h6> {{t}}:00</h6>
24 {% for schedule in schedulelist %}
25 {{schedule.start_time|date:"H"}}
26 <p>{% if schedule.start_time|date:"H"== t %} {{schedule.task}}{%
endif %}</p>
27 {% endfor %}
28 </li>
29 {% endfor %}
30 </ul>