user3574939
user3574939

Reputation: 829

django.template.exceptions.TemplateDoesNotExist: home.html

django project was working fine! home page and other pages were rendering no problems. I creating products app/ component page and accidentally named "templates" template so i renamed template to "templates" and that when i started have issues.

I ran terminal commands:

Nothing is working!

I am getting an error message:

django.template.exceptions.TemplateDoesNotExist: home.html

Upvotes: 1

Views: 8379

Answers (2)

Carlo Ledesma
Carlo Ledesma

Reputation: 446

Your app should be added to INSTALLED_APPS in settings.py

INSTALLED_APPS = [
    'name_of_your_app'
]

Upvotes: 1

Matthew Gaiser
Matthew Gaiser

Reputation: 4763

Try replacing your current 'TEMPLATES' variable in 'settings.py' with this:

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'templates')],
        'APP_DIRS': True,
    },
]

Upvotes: 6

Related Questions