Truncate lines in RSS too.

master
Nick Sergeant 2015-09-28 13:28:18 -04:00
parent 14bafb61b7
commit 65d6ff81f3
1 changed files with 5 additions and 1 deletions

View File

@ -8,7 +8,11 @@
<item>
<title>{{ snipt.title }}</title>
<link>{{ snipt.get_full_absolute_url }}</link>
<description><![CDATA[{{ snipt.code }}]]></description>
{% if snipt.line_count > 300 %}
<description><![CDATA[{{ snipt.code|truncate_lines }}]]></description>
{% else %}
<description><![CDATA[{{ snipt.code }}]]></description>
{% endif %}
<tags>{% for tag in snipt.tags.all %}{{ tag }}{% if not forloop.last %}, {% endif %}{% endfor %}</tags>
<pubDate>{{ snipt.created|date:"r" }}</pubDate>
<guid isPermaLink="false">snipt-net-{{ snipt.id }}</guid>