Categories
Python Answers

How to fix Python Django TemplateDoesNotExist error?

Spread the love

To fix Python Django TemplateDoesNotExist error, we can register the template directories in our app.

For instance, in settings.py, we add

TEMPLATE_DIRS = (
    os.path.join(SETTINGS_PATH, 'templates'),
)

to register the templates directory as the directory with the templates.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *