use teaser

This commit is contained in:
root 2017-12-18 14:29:17 +00:00
parent 54956d7f0a
commit ef24734e32
4 changed files with 3 additions and 3 deletions

BIN
campdb.gz

Binary file not shown.

View File

@ -102,7 +102,7 @@ class Content(models.Model):
if self.teaser:
value = self.teaser
elif self.header:
value = ox.strip_tags(ox.decode_html(self.header))[:100]
value = ox.strip_tags(ox.decode_html(markdownify(self.header)))[:100]
else:
value = ''
return mark_safe(value)

View File

@ -41,7 +41,7 @@
<a href="{{ projects.get_absolute_url }}"> <img src="{{ projects.image_url }}"> </a>
</div>
<div class="small-6 columns">
<a href="{{ projects.get_absolute_url }}/" class="sidebar-title">{{ projects.title }}</a>
<a href="{{ projects.get_absolute_url }}" class="sidebar-title">{{ projects.title }}</a>
<p> {{projects.formatted_teaser}} </p>
</div>
</div>

View File

@ -15,7 +15,7 @@
{% endif %}
<div class="small-6 columns">
<a href="{{ content.get_absolute_url }}/" class="sidebar-title">{{ content.title }}</a>
<p> {{content.header|striptags|truncatechars:100}} </p>
<p> {{content.formatted_teaser}} </p>
</div>
</div>
{% endfor %}