1👍
✅
You render the template with:
def lead_list(request):
context = {
'leads': Lead.objects.all()
}
return render(request, 'leads/lead_list.html', context)
The APP_DIRS
setting means that Django will look into the templates/
directories of the apps, but since no such directory contains a lead_list.html
file directly, it raises an error. There is however such template in a leads
directory in the template directory.
Source:stackexchange.com