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):
|
class BlogCategory(TranslatableModel):
|
||||||
"""
|
"""
|
||||||
Blog category
|
Blog category
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
parent = models.ForeignKey('self', verbose_name=_('parent'), null=True,
|
parent = models.ForeignKey('self', verbose_name=_('parent'), null=True,
|
||||||
blank=True)
|
blank=True)
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<img src="{{ thumb.url }}" alt="{{ post.main_image.default_alt_text }}" width="{{ thumb.width }}" height="{{ thumb.height }}" />
|
<img src="{{ thumb.url }}" alt="{{ post.main_image.default_alt_text }}" width="{{ thumb.width }}" height="{{ thumb.height }}" />
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="blog-lead">{% show_editable_model post "abstract" %}</div>
|
<div class="blog-lead">{% render_model post "abstract" %}</div>
|
||||||
<footer class="read-more">
|
<footer class="read-more">
|
||||||
<a href="{{ post.get_absolute_url }}">{% trans "read more" %} »</a>
|
<a href="{{ post.get_absolute_url }}">{% trans "read more" %} »</a>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{% block content_blog %}{% spaceless %}
|
{% block content_blog %}{% spaceless %}
|
||||||
<article id="post-{{ post.slug }}" class="post-item post-detail">
|
<article id="post-{{ post.slug }}" class="post-item post-detail">
|
||||||
<header>
|
<header>
|
||||||
<h2>{% show_editable_model post "title" %}</h2>
|
<h2>{% render_model post "title" %}</h2>
|
||||||
{% block blog_meta %}
|
{% block blog_meta %}
|
||||||
<ul class="post-detail">
|
<ul class="post-detail">
|
||||||
<li>
|
<li>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
<img src="{{ thumb.url }}" alt="{{ post.main_image.default_alt_text }}" width="{{ thumb.width }}" height="{{ thumb.height }}" />
|
<img src="{{ thumb.url }}" alt="{{ post.main_image.default_alt_text }}" width="{{ thumb.width }}" height="{{ thumb.height }}" />
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% 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>
|
<div class="blog-content">{% render_placeholder post.content %}</div>
|
||||||
</article>
|
</article>
|
||||||
{% endspaceless %}{% endblock content_blog %}
|
{% endspaceless %}{% endblock content_blog %}
|
Loading…
Reference in a new issue