Django TemplateDoesNotExist Error on Windows machine
So, here is the fully explained Django TemplateDoesNotExist error with solution.
Removing below piece of code from settings.py file.
Directory stucture like :
mysites/ manage.py mysites/ __init__.py settings.py urls.py wsgi.py
#settings.py ... TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [''], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] ...
Add this : ‘DIRS’: [r’C:/Users/thispc/django_projects/templates’], Line number 4th.
Change : TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [r'C:/Users/thispc/django_projects/templates'], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ]