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: if self.teaser:
value = self.teaser value = self.teaser
elif self.header: 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: else:
value = '' value = ''
return mark_safe(value) return mark_safe(value)

View File

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

View File

@ -15,7 +15,7 @@
{% endif %} {% endif %}
<div class="small-6 columns"> <div class="small-6 columns">
<a href="{{ content.get_absolute_url }}/" class="sidebar-title">{{ content.title }}</a> <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>
</div> </div>
{% endfor %} {% endfor %}