Fix support for render_model
This commit is contained in:
parent
1c67313fd2
commit
d31196f23b
3 changed files with 5 additions and 3 deletions
|
@ -22,6 +22,8 @@ from .fields import UsersWithPermsManyToManyField
|
|||
class BlogCategory(TranslatableModel):
|
||||
"""
|
||||
Blog category
|
||||
|
||||
|
||||
"""
|
||||
parent = models.ForeignKey('self', verbose_name=_('parent'), null=True,
|
||||
blank=True)
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<img src="{{ thumb.url }}" alt="{{ post.main_image.default_alt_text }}" width="{{ thumb.width }}" height="{{ thumb.height }}" />
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="blog-lead">{% show_editable_model post "abstract" %}</div>
|
||||
<div class="blog-lead">{% render_model post "abstract" %}</div>
|
||||
<footer class="read-more">
|
||||
<a href="{{ post.get_absolute_url }}">{% trans "read more" %} »</a>
|
||||
</footer>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{% block content_blog %}{% spaceless %}
|
||||
<article id="post-{{ post.slug }}" class="post-item post-detail">
|
||||
<header>
|
||||
<h2>{% show_editable_model post "title" %}</h2>
|
||||
<h2>{% render_model post "title" %}</h2>
|
||||
{% block blog_meta %}
|
||||
<ul class="post-detail">
|
||||
<li>
|
||||
|
@ -35,7 +35,7 @@
|
|||
<img src="{{ thumb.url }}" alt="{{ post.main_image.default_alt_text }}" width="{{ thumb.width }}" height="{{ thumb.height }}" />
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="blog-lead">{% show_editable_model post "abstract" "abstract" %}</div>
|
||||
<div class="blog-lead">{% render_model post "abstract" "abstract" %}</div>
|
||||
<div class="blog-content">{% render_placeholder post.content %}</div>
|
||||
</article>
|
||||
{% endspaceless %}{% endblock content_blog %}
|
Loading…
Reference in a new issue