windows10 Pycharm Community 2019.3 Python3.7 Django 3.03
It is assumed that you are creating a Django project and application. See below Until you create a Django application in the terminal
When I went to read index.html, "TemplateDoesNotExist at /" It comes out, and index.html does not come out!
I researched various things and tried the following, but it didn't change ...
① Modify TEMPLATES = in setting.py as follows
'DIRS': [], ↓ 'DIRS': [BASE_DIR, "templates"],
(2) Modify TEMPLATES = in setting.py as follows
'DIRS': [], ↓ 'DIRS': [os.path.join('app_private_diary','templates')],
In the first place, this error, does the file exist? Error that the file cannot be read.
Looking at the previous error
I want to read index.html, but I can see that it is displayed as index \ html.
If you look at view.py, you can see that it is index \ html.
index/html → index.html
After changing to, the error disappeared.
It was a basic one (crying).
that's all
Recommended Posts