テンプレートに sorl-thumnail を導入すると、壊れます。
動作する部分は次のとおりです。
{% for product in products %}
<ul class="thumbnails">
{% for productImage in product.images.all %}
...
{% endfor %}
...
{% endfor %}
そして、これはそうではありません:
{% load thumbnail %}
{% for product in products %}
<ul class="thumbnails">
{% for productImage in product.images.all %}
<li class="span4">
{% thumbnail productImage.image "160x200" as im %}
<img src="{{ im.url }}" alt = "" />
{% endthumbnail %}
</li>
{% endfor %}
...
{% endfor %}
そして、これが起こることです:
Exception Type: TemplateSyntaxError
Exception Value:
Caught DatabaseError while rendering: current transaction is aborted, commands ignored until end of transaction block
1 {% load thumbnail %}
2 {% for product in products %}
2 行目は赤でマークされています。
また、{% ロード サムネイル %} タグのみを使用し、残りを省略しても、すべて問題ありません (これらの素敵なサムネイルを表示できないことを除いて)。
問題が何であるかについてのアイデアはありますか?