主要的。html,store.html 图像,views.py 图像 url.py 图像我正在使用 Django 和 python 构建一个 e.com 网站.. main.html 几乎没有问题,我在这里分享代码和错误截图帮助我与这些人 我被卡住的错误图片
'''模板渲染时出错 在模板 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));
'''