Skip to content

Commit

Permalink
template variables
Browse files Browse the repository at this point in the history
  • Loading branch information
pylbatu committed Apr 29, 2020
1 parent 9d5abfa commit 6c977c4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion website/templates/website/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
<body>
<h1>Welcome Pyl!</h1>
<p>
You are awesome!
{{ welcome_message }}
</p>
<p>
{{ secret_message }}
</p>
</body>
</html>
5 changes: 4 additions & 1 deletion website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@


def welcome(request):
return render(request, 'website/welcome.html')
return render(request, 'website/welcome.html', {
'welcome_message': 'You are super!',
'secret_message' : 'You are loved!'
})


def date(request):
Expand Down

0 comments on commit 6c977c4

Please sign in to comment.