Merge pull request #25 from JulienPalard/AvoidNone

Avoid displaying 'None'.
This commit is contained in:
Guillaume Ayoub 2018-05-16 15:12:55 +02:00 committed by GitHub
commit 572bf54a96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@
</time>
<p>
<em>
{{ post.summary | safe }}
{{ post.summary | safe if post.summary }}
</em>
</p>
{% if post.image %}
@ -21,7 +21,7 @@
</article>
{% if name == 'emplois' %}
<aside>
<h2>{{ post.company }}</h2>
<h2>{{ post.company or "(Société inconnue)" }}</h2>
<dl>
{% if post.address %}
<dt>Adresse</dt>

View File

@ -18,7 +18,7 @@
{% if post.image %}
<img src="{{ url_for('post_image', path=post.image) }}" alt="{{ post.title }}" />
{% endif %}
{{ post.summary | safe }}
{{ post.summary | safe if post.summary }}
<p><a href="{{ url_for('post', name=name, timestamp=timestamp) }}">Lire la suite…</a></p>
</article>
{% endfor %}