projects
/
django-girls.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec7d2a8
)
Added truncation to post text in list view
author
Neil Smith
<neil.git@njae.me.uk>
Tue, 11 Oct 2016 10:47:41 +0000
(11:47 +0100)
committer
Neil Smith
<neil.git@njae.me.uk>
Tue, 11 Oct 2016 10:47:41 +0000
(11:47 +0100)
blog/templates/blog/post_list.html
patch
|
blob
|
history
diff --git
a/blog/templates/blog/post_list.html
b/blog/templates/blog/post_list.html
index eb1647a5e1e304356185d1d82854b53e2d9bce29..d3fa8ef089a277633c22b6f35368db9d3f503963 100644
(file)
--- a/
blog/templates/blog/post_list.html
+++ b/
blog/templates/blog/post_list.html
@@
-7,7
+7,7
@@
<p>published: {{ post.published_date }}</p>
</div>
<h1><a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a></h1>
- <p>{{ post.text|linebreaksbr }}</p>
+ <p>{{ post.text|linebreaksbr
|truncatewords_html:100
}}</p>
</div>
{% endfor %}
{% endblock %}
\ No newline at end of file