main. html , store.html image , views.py image url.py image 我正在使用Django和python建立一个e.com网站。 main.html几乎没有问题 我在这里分享代码和错误截图 帮助我和这些家伙 error image i got stuck with
''''模板渲染期间发生错误 在模板C:\ Users \ vinay \ Documents \ project \ ecom \ store \ templates \ store \ main.html中,第16行出现错误
找不到与“”相反的字符。 ''不是有效的视图函数或模式名称。 6
<head>
7 <title>Ecom</title>
8
9 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1" />
10
11 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
12
13 <link rel="stylesheet" type="text/css" href="{% static 'css/main.css' %}">
14
15 <script type="text/javascript">
16 var user = '{{request.user}}'
17
18 function getToken(name) {
19 var cookieValue = null;
20 if (document.cookie && document.cookie !== '') {
21 var cookies = document.cookie.split(';');
22 for (var i = 0; i < cookies.length; i++) {
23 var cookie = cookies[i].trim();
24 // Does this cookie string begin with the name we want?
25 if (cookie.substring(0, name.length + 1) === (name + '=')) {
26 cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
'''