How can I embed django csrf token straight into HTML? July 28, 2023 by Tarik Call django.middleware.csrf.get_token(request) to get the CSRF token.