Django Seems not out there looking for a template or an incorrectly written function, what to do?

In General, I tried to create my first website in Django(Django version 3.0.5 Python version 3.8.2). The course was quite outdated but all minor problems quickly resolved.
Folder structure:

mysite\

mainApp\

__pycache__
migrations\

__pycache__

mysite\

__pycache__
tamplates

I started to do the main page
from django.contrib import admin
from django.urls import path, include, 

mapping includes = [
 path(R ' / admin/', admin.site.urls),
 <b>path(r'^$', include('mainApp.urls')),</b>
 ]

This file urls.py highlighted is the link which was supposed to open the main page, it starts another file urls.py in the mainApp folder
from django.urls import path, include, 
from . import views

mapping includes = [
 path('^$', views.index, name='index')
]

it calls the function index from a file vievs.py
from django.shortcuts import render

def index(request):
 return render(request, 'mainApp/homePage.html')

And then the fun begins. When I run the website on a local server gives a 404 error, although the idea is if the input path(r'^$')quotes should be considered empty, but in the new version you just need to leave them blank(Which I did). But this led to errors
TemplateDoesNotExist at /
mainApp/homePage.html
Template-loader postmortem
Django tried loading these templates, in this order:

Using django engine:

django.template.loaders.app_directories.Loader: C:\Users\Елена\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\contrib\admin\templates\mainApp\homePage.html (Source does not exist)
django.template.loaders.app_directories.Loader: C:\Users\Елена\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\contrib\auth\templates\mainApp\homePage.html (Source does not exist)

Traceback
C:\Users\Елена\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\core\handlers\exception.py in inner
response = get_response(request) ...
▶ Local vars
C:\Users\Елена\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\core\handlers\base.py in _get_response
response = self.process_exception_by_middleware(e, request) ...
▶ Local vars
C:\Users\Елена\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\core\handlers\base.py in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs) ...
▶ Local vars
E:\Projects\mysite\mainApp\views.py in index
return render(request, 'mainApp/homePage.html') ...
▶ Local vars
C:\Users\Елена\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\shortcuts.py in render
content = loader.render_to_string(template_name, context, request, using=using) ...
▶ Local vars
C:\Users\Елена\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\template\loader.py in render_to_string
template = get_template(template_name, using=using) ...
▶ Local vars
C:\Users\Елена\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\template\loader.py in get_template
raise TemplateDoesNotExist(template_name, chain=chain) ...
▶ Local vars

I tried to get around the problem and not solve it and just instead of that to leave the single quotes empty, I've filled in 'main'. But it didn't help when I launched 127.0.0.1:8000/main issued a 404 error and in the list of existing pages written is:
admin/
main main [name='index']
The current path, main/, didn't match any of these.
I thought that the most likely error in the index I looked and did not understand what the problem is. Read what could be the problem due to the fact that django can't find the html files in the templates directory.
In the file settings.py in TEMPLATES_DIRS Prescribed os.path.join(BASE_DIR, 'templates'
Checked at the beginning of the file should import os.
After that, it became to give 3 errors

Using django engine:

django.template.loaders.filesystem.Loader: E:\Projects\mysite\templates\mainApp\homePage.html (Source does not exist)
django.template.loaders.app_directories.Loader: C:\Users\Елена\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\contrib\admin\templates\mainApp\homePage.html (Source does not exist)
django.template.loaders.app_directories.Loader: C:\Users\Елена\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\contrib\auth\templates\mainApp\homePage.html (Source does not exist)

In Traceback like all the same

And I could do nothing but to check the spelling of the names, but it came to no avail.
In INSTALLED_APPS I also checked whether I have connected the mainApp folder (Yes, plugged in), tried to change the function name and you do not know what to do.
April 19th 20 at 12:37
0 answer

Find more questions by tags Django