1👍
✅
Don’t use render_to_response
in your test
view. It doesn’t run context processors which are required to insert things like messages
– and other useful items such as user
– into the context.
Use render
instead:
return render(request, 'index3.html', context)
Source:stackexchange.com