use teaser
This commit is contained in:
parent
54956d7f0a
commit
ef24734e32
|
@ -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)
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user