request.session['idempresa'] = idempresaValue
#you do not need to add anything
def index(request):
request.session[0] = 'bar'
return HttpResponse(request.session[0])
https://mefiz.com/ # For Developer
python-django
request.session["name"] = "name" #views.py
value='{{ request.session.name }}' # example.html
https://www.youtube.com/momintechpro