template does not exist

I was using django 2.0 ,my templates were working fine ,but now i changed the version to 3.0 , it is giving error Template does not exist

My views.py:-

from django.shortcuts import render
from testApp.models import Employee
from django.http import HttpResponse
# Create your views here.
def empinfo(request):
    return render(request,'testApp/emp.html',context=my_dict)


<!DOCTYPE html>
{%load static}
<html lang="en" dir="ltr">
    <meta charset="utf-8">
  <link rel="stylesheet" href="{%static "css/demo3.css"%}">
<h1>This is sample response</h1>


BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [TEMPLATE_DIR],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [


 File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
    response = get_response(request)
  File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\handlers\base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "E:\DJANGOPROJECT\EMPproject\testApp\views.py", line 8, in empinfo
    return render(request,'testApp/emp.html',context=my_dict)
  File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\django\shortcuts.py", line 19, in render
    content = loader.render_to_string(template_name, context, request, using=using)
  File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\django\template\loader.py", line 61, in render_to_string
    template = get_template(template_name, using=using)
  File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\django\template\loader.py", line 19, in get_template
    raise TemplateDoesNotExist(template_name, chain=chain)
django.template.exceptions.TemplateDoesNotExist: testApp/emp.html
[05/May/2021 14:36:57] "GET /empinfo/ HTTP/1.1" 500 81956
Not Found: /favicon.ico
[05/May/2021 14:36:58] "GET /favicon.ico HTTP/1.1" 404 2084

and i have added template_dir in DIRS

Please help me in resolving this error

The TEMPLATE_DIRS setting was deprecated back in Django 1.8.

The current method for defining templates is the TEMPLATE setting.

I have updated the above post by using templates ,you can check ,is this you are talking, it is not working

In what directory is your emp.html file located?

The directory structure is templates/testApp/emp.html

Is it EMPproject/testApp/templates/testApp/emp.html or

The first should be picked up by the APP_DIRS: True setting, the second should be found because of being in the DIRS list. If it is the second, you might want to check to verify that your TEMPLATE_DIR is what you’re expecting it to be.

Also, you mention that you’re using Django 3.0. Which subversion of 3.0 are you using? Python 3.9 is not officially supported until 3.0.11 - if you’re using an earlier version, you might want to bring it up to date.

Thanks for helping, the issue was resolved

Hey, how did you resolve this issue. My code piece is as below but I am unable to move forward.

From views.py :

class UserListView(ListView):
    model = User
    queryset = User.objects.all()

From urls.py
urlpatterns = [path("user_list/", UserListView.as_view(), name="user_list"),]

Error : 
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\django\template\loader.py", line 47, in select_template
    raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain)
django.template.exceptions.TemplateDoesNotExist: auth/user_list.html
[15/Mar/2022 20:18:13] ?[35;1m"GET /users/user_list/ HTTP/1.1" 500 78938?[0m

This is a different issue with (likely) a different solution. I suggest you open a new topic for it.

Sure I will open up a new topic. Thanks