django set session variable in template code example Example: django set session variable request.session['idempresa'] = idempresaValue