I am getting an error in all of my templates for all the paths in buttons. This error appeared after I switched computers and opened the project in VS Code. The odd thing is it runs just fine, no errors in the browser but every template with a button that specifies a url yields the error.
{% extends "ESG/layout.html" %}
{% block content %}
<style>
</style>
{% csrf_token %}
<div class=t4>
<!-- Use text in Introduction in DB for text in HTML Page-->
{{ intro_text|safe}}
</div>
<button input type='button' name=Begin Survey onclick="location.href='{% url 'results' pathstr=current_path %}'"><lable>Begin Survey</lable></button>
{% endblock %}
Error details:
[{
"resource": "/Volumes/Backup/Current Python Projects/Python Projects/Strategia/ESG/templates/ESG/introduction.html",
"owner": "_generated_diagnostic_collection_name_#1",
"severity": 8,
"message": "';' expected.",
"source": "javascript",
"startLineNumber": 13,
"startColumn": 79,
"endLineNumber": 13,
"endColumn": 86
}]
It doesn’t seem to matter if the template extends another or not, but here is the template that is extended:
{% load static %}
<!DOCTYPE html>
<html lang = "en">
<meta name="viewport" content="width=device-width, initial-scale=1, height=device-height">
<head>
<link rel="stylesheet" href="{% static 'css/styles.css' %}">
<script src="{% static 'js/echarts.js' %}"></script>
<title>{{ browsertab }}</title>
</head>
<body>
<h1>{{ dashboard_title }}</h1>
<!--Create flexbox to render header graphic-->
<div class="container_layout" style="top: 5%;">
<!--Create LOO shape-->
<div class="item_LoO_Name">
<div class="t1">{{ project }}</div>
<div class="t2">{{ projecttext }}</div>
</div>
<!--Create row of topic shapes and spacer between shapes-->
{%for x_topics in surveytopics%}
<div class="space"></div>
<div class={{x_topics.context}}>{{ x_topics.area }}</div>
{% endfor %}
<!--Create pointed arrow and space to Outcome-->
<div class="space"></div>
<div class="triangle-right"></div>
<div class="spaceblank"></div>
<!--Create Outcome Shape-->
<div class="item_Outcome_Name">
<div class="t1">{{outcome}}</div>
<div class="t3">{{ outcometext }}</div>
</div>
</div>
<br>
{% block content %}
{% endblock %}
</body>
</html>