[MERGE] forward port branch 10.0 up to a93a5c6824

This commit is contained in:
Christophe Simonis
2018-04-05 19:40:54 +02:00
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -165,7 +165,7 @@ class BlogPost(models.Model):
blog_post.teaser = blog_post.teaser_manual
else:
content = html2plaintext(blog_post.content).replace('\n', ' ')
blog_post.teaser = ' '.join(filter(None, content.split(' '))[:50]) + '...'
blog_post.teaser = content[:150] + '...'
@api.multi
def _set_teaser(self):
@@ -101,6 +101,7 @@
<t t-call="website_blog.index">
<t t-set="head">
<link t-att-href="'/blog/%s/feed' % (blog.id)" type="application/atom+xml" rel="alternate" title="Atom Feed"/>
<meta t-if="len(active_tag_ids) > 0" name="robots" t-attf-content="#{len(active_tag_ids) > 1 and 'noindex,'} nofollow"/>
</t>
<div class="oe_structure"/>
<div class="container">