python - Django : How to access current logged in user's id in javascript? - Stack Overflow

PHOTO EMBED

Wed May 25 2022 00:39:03 GMT+0000 (Coordinated Universal Time)

Saved by @musikito #django #js #javascript

const user_id = JSON.parse(document.getElementById('user_id').textContent);
content_copyCOPY

https://stackoverflow.com/questions/34719230/django-how-to-access-current-logged-in-users-id-in-javascript