fix post date and if- and with- condition

This commit is contained in:
2022-04-02 08:49:10 +00:00
parent 96805b2cc1
commit 05b60c875e
2 changed files with 5 additions and 7 deletions

View File

@@ -47,7 +47,9 @@
{% endwith %} {% endwith %}
{% endif %} {% endif %}
{% for post in featured_meeting %} {% for post in featured_meeting %}
{% include 'posts/partials/_article_row.html' %} {% if post %}
{% include 'posts/partials/_article_row.html' %}
{% endif %}
{% endfor %} {% endfor %}
</div> </div>
</section> </section>
@@ -70,7 +72,7 @@
<h2 class="section-title section-title-margins">Zuletzt veröffentlicht</h2> <h2 class="section-title section-title-margins">Zuletzt veröffentlicht</h2>
{% if featured_post %} {% if featured_post %}
{% with post=featured_event %} {% with post=featured_post %}
{% include 'posts/partials/_posts_pinned.html' %} {% include 'posts/partials/_posts_pinned.html' %}
{% endwith %} {% endwith %}
{% endif %} {% endif %}

View File

@@ -18,11 +18,7 @@
<a href="{{ post.url }}"><h3 class="text-gray-50">{{ post.title | safe }}</h3></a> <a href="{{ post.url }}"><h3 class="text-gray-50">{{ post.title | safe }}</h3></a>
<div class="text-gray-200"> <div class="text-gray-200">
<i class="fas fa-clock"></i> <i class="fas fa-clock"></i>
{% if post.post_type != 'N' %} {{ post.date|date:"d. F Y" }}
{{ post.event_start|date:"d. F Y" }}
{% else %}
{{ post.public_date|date:"d. F Y" }}
{% endif %}
</div> </div>
</div> </div>
</div> </div>