Hi I want to add the tag {{request.user.first_name}} in my js code. I am aware that if the js code is within the HTML document you can easily add any Django template tag in Django version 3.2.
But for now, my HTML is as such...
<script src="{% static 'dashboard/driver.js' %}"></script>
Which contains over 2000 lines, and I do not want to include it in my HTML file.
So my question is can I add the tag {{request.user.first_name}} and several others in a separate JS file, in my case driver.js.
Any help would be greatly appreciated.
Thanks!