Add the tasks to be shown on the index page.
This commit is contained in:
+7
-1
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user