From 05b60c875e4d74408909ee7e6b170b65c621cbc3 Mon Sep 17 00:00:00 2001 From: Patrick Mayr Date: Sat, 2 Apr 2022 08:49:10 +0000 Subject: [PATCH] fix post date and if- and with- condition --- fet2020/templates/home.html | 6 ++++-- fet2020/templates/posts/partials/_posts_pinned.html | 6 +----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/fet2020/templates/home.html b/fet2020/templates/home.html index 88d28eb0..f385aa5e 100644 --- a/fet2020/templates/home.html +++ b/fet2020/templates/home.html @@ -47,7 +47,9 @@ {% endwith %} {% endif %} {% for post in featured_meeting %} - {% include 'posts/partials/_article_row.html' %} + {% if post %} + {% include 'posts/partials/_article_row.html' %} + {% endif %} {% endfor %} @@ -70,7 +72,7 @@

Zuletzt veröffentlicht

{% if featured_post %} - {% with post=featured_event %} + {% with post=featured_post %} {% include 'posts/partials/_posts_pinned.html' %} {% endwith %} {% endif %} diff --git a/fet2020/templates/posts/partials/_posts_pinned.html b/fet2020/templates/posts/partials/_posts_pinned.html index 2c2d753e..2ed55ee4 100644 --- a/fet2020/templates/posts/partials/_posts_pinned.html +++ b/fet2020/templates/posts/partials/_posts_pinned.html @@ -18,11 +18,7 @@

{{ post.title | safe }}

- {% if post.post_type != 'N' %} - {{ post.event_start|date:"d. F Y" }} - {% else %} - {{ post.public_date|date:"d. F Y" }} - {% endif %} + {{ post.date|date:"d. F Y" }}