django & the "TemplateDoesNotExist" error

One of the solution to this problem is you should add apps to in settings.py. I assume you have an application named such as invoice then solution to this is

INSTALLED_APPS = [
'invoice.apps.InoviceConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]

Holy mother of god! I solved it!

I do not know why - but this is the solution to the "TemplateDoesNotExist" error (in my case).

My folder structure is like this:

netz2 > skateproject

till now i had the templates folder in skateproject and in settings.py i pointed to this directory. this threw the template does not exist error when I tried to open the page in firefox.

as skateproject is the project folder in there ive got an folder sk8 - which is the app that im currently working on and that im trying to execute. The solution is super simple.

I had to move the templates in the subdirectory of the app. which looks like this

netz2 > skateproject > sk8 > templates

and now it works!

So if you have the same problem, make sure your templates folder is not in the root of the project but is a subdirectory of the app youre working on - AND add this path to the settings.py Template_dirs

it looks like this in my example:

TEMPLATE_DIRS = (
    r'H:/netz2/skateprojekt/sk8/templates/',
)