[Django]-Django TypeError at / render() got an unexpected keyword argument 'context_instance'

4👍

django.shortcuts.render‘s third parameter is context, not context_instance; You should replace context_instance= with context= (or you can pass it as a positional argument). In addition to that, just pass a dictionary.

return render(
    request,
    'app/index.html',
    {
        'title':'Home Page',
        'year':datetime.now().year,
    }
)

Leave a comment