 <p><code>add_csrf()</code> is a function which returns a dict. It is used to add a csrf token along with the request arguments.</p> <pre><code>from django.core.context_processors import csrf def add_csrf(request, **kwargs): """ Add CSRF to dictionary. """ d = dict(user=request.user, **kwargs) d.update(csrf(request)) return d </code></pre> <p>Where as <code>dict()</code> is a python built-in function used to create a dict </p>