Skip to content

Commit

Permalink
for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
pylbatu committed Apr 29, 2020
1 parent dc79f70 commit f7f1487
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions website/templates/website/welcome.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-*">
<title>Welcome!</title>
</head>

<body>
<h1>Welcome Pyl!</h1>
<p>
Expand All @@ -15,5 +17,15 @@ <h1>Welcome Pyl!</h1>
<p>
You have {{ meetings_count }} meetings.
</p>

<h2>Meetings</h2>
<ul>
{% for meeting in meetings%}
<li>
{{ meeting }}
</li>
{% endfor %}
</ul>
</body>

</html>
2 changes: 1 addition & 1 deletion website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def welcome(request):
return render(request, 'website/welcome.html', {
'welcome_message': 'You are super!',
'secret_message' : 'You are loved!',
'meetings_count': Meeting.objects.count()
'meetings': Meeting.objects.all()
})


Expand Down

0 comments on commit f7f1487

Please sign in to comment.