1👍
✅
You’re not using a RequestContext when rendering the template, so the request variable is not present. Use the render
shortcut instead.
return render(request, 'registration/logout.html')
Source:stackexchange.com