1👍
✅
Try this,
<a href="#" class="btn btn-primary btn-sm" href="#" onclick="changeButton( '{{ request.session.variable }}' );return false;">Button</a>
‘{{ request.session.variable }}’
Source:stackexchange.com