[Answer]-Django path to templates for apps


Django supports this automatically, via the app_directories loader that is installed by default. See the documentation.


Maybe you can do the following:

import os
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
    os.path.join(PROJECT_PATH, 'templates'),
    os.path.join(PROJECT_PATH, 'app1/templates'),

This will save you from editing each and every absolute path in setting file in case you happen to move your project.

Leave a comment