Skip to content

Commit

Permalink
model from DB
Browse files Browse the repository at this point in the history
  • Loading branch information
pylbatu committed Apr 29, 2020
1 parent 6c977c4 commit c5fa757
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions website/templates/website/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ <h1>Welcome Pyl!</h1>
<p>
{{ secret_message }}
</p>
<p>
You have {{ meetings_count }} meetings.
</p>
</body>
</html>
4 changes: 3 additions & 1 deletion website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
from datetime import datetime
from django.shortcuts import render
from django.http import HttpResponse
from meetings.models import Meeting
# Create your views here.


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


Expand Down

0 comments on commit c5fa757

Please sign in to comment.