Comments (2)
找不到config/index.html这个文件的路径,你检查一下'DIRS': [os.path.join(BASE_DIR, 'templates/')],这里的路径是否设置正确。
你可以看这些错误提示信息,看django加载templates文件的路径是否是你设置的路径。
from typeidea.
非常感谢老师抽空回复,目前这个问题得到了解决;
可能因为我使用的是Django3.0版本,vscode中配置了anaconda虚拟环境,以及macOS系统的原因,
目前解决的办法是通过手写'DIRS': [os.path.join(BASE_DIR, 'templates/')]中【BASE_DIR】替换为本地的绝对路径,
重新运行后可以正确加载本地的样式文件了。
(因为初次使用github,问题本身的排版比较丑,再次感谢老师的耐心阅读和解答)
from typeidea.
Related Issues (20)
- 《Django企业开发实战》2020年3月河北第6次印刷第194页代码,解惑??? HOT 1
- 代码完善:《Django企业开发实战》2020年3月河北第6次印刷第197页
- makemigrations/makemigrate/dbshell命令无效,请胡老师看下什么问题 HOT 6
- python3 manage.py makemigrations 时提示no changes detectd HOT 10
- 关于djdt-flamegraph插件的AttributeError: module 'signal' has no attribute 'SIGALRM':《Django企业开发实战》2020年3月河北第6次印刷第268页
- 配置完urls后运行项目如图 HOT 4
- 《Django企业开发实战》第9章-增加搜索功能(报错) HOT 2
- 《Django企业开发实战》2019年5月北京第三次印刷6.2章节问题请教 HOT 1
- 115页 6.1.2 报错呢。。 HOT 3
- FieldError 字段错误,找了两个小时,实在不知道哪里错了。 HOT 1
- 关于css引用文件路径问题 HOT 9
- 能不能把requirements.txt整理一下吗 HOT 2
- 'PostDetailView' object has no attribute 'object'
- 第六章,内联问题请教
- 5.1说的CHANGELOG.md,LICENSE,README.md,requirements.txt都是手动建立的吗?
- 带tag的文章列表
- typeidea/blog/views.py 第18行的super()的父类是哪个,class中好像没有传入
- 前四章的分支去哪里了?
- 前四章的分支去哪里了?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typeidea.