When I run my project it is giving this error:TemplateDoesNotExist at / main_page/home.html.

Welcome @Muslihiddin-1 !

A few notes for you.

  • Please don’t try to describe the entire issue in the title, use the body of the post for the information needed. (I have fixed the title for you)

  • Please don’t post images unless necessary. (Especially don’t use images for code, templates, or error messages.) It’s a lot more helpful to copy/paste your runserver log showing the complete traceback.

  • We’ll need more details here regarding your project

    • What directory is your home.html file in?
    • What does your TEMPLATES setting look like?

first I recommend you check if you have the path of the main_page folder in the file settings.py specifically in ‘DIRS’: [‘folder path’ ], another thing I recommend is that you rename your templates folder with the following name: templates Since Django automatically detects that there are templates there (it’s optional) then your code would be: return render(request, home.html)