Fix support for render_model

This commit is contained in:
Iacopo Spalletti 2014-01-22 18:14:50 +01:00
parent 1c67313fd2
commit d31196f23b
3 changed files with 5 additions and 3 deletions

View file

@ -22,6 +22,8 @@ from .fields import UsersWithPermsManyToManyField
class BlogCategory(TranslatableModel):
"""
Blog category
"""
parent = models.ForeignKey('self', verbose_name=_('parent'), null=True,
blank=True)

View file

@ -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" %} &raquo;</a>
</footer>

View file

@ -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 %}