[Answer]-Django path to templates for apps

1👍

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

0👍

Maybe you can do the following:

#settings.py
import os
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
TEMPLATE_DIRS = (
    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