in my test I do:
self.client.get('/')
in my template I access:
request.LANGUAGE_CODE
in the browser it works fine with the Django client I get
Failed lookup for key [LANGUAGE_CODE] in ''
From the output I believe that the request is not set in the client.
I found the error myself:
The test client was working just fine. Some of the sites were really not working.
In my views.py I had the following bug:
wrong code:
return render(some_other_view, 'page.html')
correct code:
return render(request, 'page.html')