Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add truncatewords to category description

michala773e6ffaab9
diff --git a/templates/dashboard/category/detail.html b/templates/dashboard/category/detail.html
index 9107daa8d4..5846904e84 100644
--- a/templates/dashboard/category/detail.html
+++ b/templates/dashboard/category/detail.html
@@ -138,7 +138,7 @@
</td>
<td class="nowrap">
{% if node.description %}
- {{ node.description }}
+ {{ node.description|truncatewords:6 }}
{% else %}
&nbsp;
{% endif %}
diff --git a/templates/dashboard/category/list.html b/templates/dashboard/category/list.html
index c139cde6d8..517b2ff81d 100644
--- a/templates/dashboard/category/list.html
+++ b/templates/dashboard/category/list.html
@@ -143,7 +143,7 @@
</td>
<td class="nowrap">
{% if node.description %}
- {{ node.description }}
+ {{ node.description|truncatewords:10 }}
{% else %}
&nbsp;
{% endif %}
@@ -159,7 +159,7 @@
</a>
</td>
</tr>
- {% endfor %}
+ </tbody>
</table>
</div>
</div>