I have a requirement to read the
{{ request.user.username }}
in Javascript to pass the value to Django backend. But looks like syntax doesnt allow me to pass the value. What would be the syntax for sending the Django variables from Javascript.
You can submit form with some data:
Or send request by ajax:
Then in django view you can get value: