Add the tasks to be shown on the index page.

This commit is contained in:
2023-07-12 20:43:53 +03:00
parent 7cb8cf4c54
commit 7797387d91
3 changed files with 24 additions and 1 deletions
+7 -1
View File
@@ -1,6 +1,12 @@
from django.shortcuts import render
from .models import Task
def index(request):
context = {}
tasks = Task.objects.all()
context = {
'tasks': tasks,
}
return render(request, 'tasks/index.html', context)