springboot怎么把数据传给前端:springboot 如何引入前端 bootstrap?
这种问题网上一搜一大堆,你可以具体找一篇文章试试,遇到问题可以针对相关问题去提问。springboot通过jar包方式引入bootstrap_个人文章 - SegmentFault 思否 这不是查查就
顺晟科技
2022-10-19 11:54:56
101
最近,我在运行Django项目时遇到了一个404错误。不知为什么我想不通,我需要帮助。我对django和一般编码都是新手。它以前是工作的,我不知道我做错了什么。 以下是错误
Using the URLconf defined in portfolio.urls, Django tried these URL patterns, in this order:
admin
index.html [name='index']
experience.html [name='experience']
projects.html [name='projects']
research.html [name='research']
education.html [name='education']
404.html [name='comeback']
design.html [name='design']
The empty path didn’t match any of these.
以下是程序代码。
下面是views.py
Using the URLconf defined in portfolio.urls, Django tried these URL patterns, in this order:
admin
index.html [name='index']
experience.html [name='experience']
projects.html [name='projects']
research.html [name='research']
education.html [name='education']
404.html [name='comeback']
design.html [name='design']
The empty path didn’t match any of these.
以下是urls.py(app)
Using the URLconf defined in portfolio.urls, Django tried these URL patterns, in this order:
admin
index.html [name='index']
experience.html [name='experience']
projects.html [name='projects']
research.html [name='research']
education.html [name='education']
404.html [name='comeback']
design.html [name='design']
The empty path didn’t match any of these.
这里是urls.py(其中设置是)
Using the URLconf defined in portfolio.urls, Django tried these URL patterns, in this order:
admin
index.html [name='index']
experience.html [name='experience']
projects.html [name='projects']
research.html [name='research']
education.html [name='education']
404.html [name='comeback']
design.html [name='design']
The empty path didn’t match any of these.
以下是设置。py
Using the URLconf defined in portfolio.urls, Django tried these URL patterns, in this order:
admin
index.html [name='index']
experience.html [name='experience']
projects.html [name='projects']
research.html [name='research']
education.html [name='education']
404.html [name='comeback']
design.html [name='design']
The empty path didn’t match any of these.
以下是使用
时出现的新错误Using the URLconf defined in portfolio.urls, Django tried these URL patterns, in this order:
admin
index.html [name='index']
experience.html [name='experience']
projects.html [name='projects']
research.html [name='research']
education.html [name='education']
404.html [name='comeback']
design.html [name='design']
The empty path didn’t match any of these.
复制/粘贴视图中出错
Using the URLconf defined in portfolio.urls, Django tried these URL patterns, in this order:
admin
index.html [name='index']
experience.html [name='experience']
projects.html [name='projects']
research.html [name='research']
education.html [name='education']
404.html [name='comeback']
design.html [name='design']
The empty path didn’t match any of these.
转到http://127.0.0.1:8000/admin有效,但转到http://127.0.0.1:8000/eduction
等其他页面时,我会得到上面相同的属性错误更新- 到目前为止,除了《家》之外,我还有所有的页面要写。 以下是临时修复程序
urls.ps
Using the URLconf defined in portfolio.urls, Django tried these URL patterns, in this order:
admin
index.html [name='index']
experience.html [name='experience']
projects.html [name='projects']
research.html [name='research']
education.html [name='education']
404.html [name='comeback']
design.html [name='design']
The empty path didn’t match any of these.
下面是views.py
Using the URLconf defined in portfolio.urls, Django tried these URL patterns, in this order:
admin
index.html [name='index']
experience.html [name='experience']
projects.html [name='projects']
research.html [name='research']
education.html [name='education']
404.html [name='comeback']
design.html [name='design']
The empty path didn’t match any of these.
顺晟科技:
这是因为您的主URL不匹配。如果您的网站是localhost:8000,并且您正在访问相同的url路径,则将显示404 not found,因为您还没有为主页添加路径。所以:
app.urls
Using the URLconf defined in portfolio.urls, Django tried these URL patterns, in this order:
admin
index.html [name='index']
experience.html [name='experience']
projects.html [name='projects']
research.html [name='research']
education.html [name='education']
404.html [name='comeback']
design.html [name='design']
The empty path didn’t match any of these.
并且视图中应该有home函数来呈现某个页面,就像您对其他路由所做的那样。
05
2022-12
02
2022-12
02
2022-12
29
2022-11
29
2022-11
24
2022-11