Skip to content

Commit 5f02024

Browse files
#P04.1. Only display published Hackathons (#105)
1 parent 5cca7af commit 5f02024

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

hackathon/templates/hackathon/hackathon_list.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@
55
{% if hackathons %}
66
<h2 class="p-orange text-center mb-4">Hackathons</h2>
77
{% for hackathon in hackathons %}
8-
{% include 'hackathon/includes/hackathon_card.html' %}
9-
<hr>
8+
{% if hackathon.status == 'published' or user == hackathon.created_by %}
9+
{% if not hackathon.status == 'deleted' %}
10+
{% include 'hackathon/includes/hackathon_card.html' %}
11+
<hr>
12+
{% endif %}
13+
{% endif %}
1014
{% endfor %}
1115
{% else %}
1216
<h2 class="text-center">There aren't any Hackathons at the moment!</h2>
@@ -16,4 +20,4 @@ <h2 class="text-center">There aren't any Hackathons at the moment!</h2>
1620
{% include 'hackathon/includes/paginator.html' %}
1721
</nav>
1822
</section>
19-
{% endblock %}
23+
{% endblock %}

0 commit comments

Comments
 (0)