Create a folder 'justcolor' under templates directory and save index.html in it. change path to 'justcolor/index.html'. return render(request, 'justcolor/index.html')
Make sure you have configured urls.py and views.py correctly.
This question is already answered here: Django TemplateDoesNotExist?
Make a templates\justColor
subdirectory template inside your justColor
folder and move index.html
to there. Then as @Neeraj said you can change render call to render(request, 'justColor/index.html')
.
(Although you should read this part of the django tutorial which will help you more than any trial-and-error in this subject: https://docs.djangoproject.com/en/3.0/intro/tutorial03/ )
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.