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