[Answer]-Newbie need help on a django view element

1👍

It’s referring to the RequestContext that is passed to the template. A lot of tutorials construct the request context in a very outdated way. Django’s render shortcut function will take care of constructing the context instance for you:

from django.shortcuts import render

def your_view(request):
    context = {'foo': 'bar'}
    return render(request, 'some-template.html', context)

In this case, the positional argument context gets passed in as argument to the RequestContext class behind the scenes.

Leave a comment