2👍
✅
Call dirname
three times:
import os
dirname = os.path.dirname
PROJECT_PATH = dirname(dirname(dirname(os.path.abspath(__file__))))
TEMPLATE_DIRS = (
os.path.join(PROJECT_PATH, 'templates'),
)
dirname(...)
:../DjangoApp/DjangoApp/settings
dirname(dirname(...))
:../DjangoApp/DjangoApp
dirname(dirname(dirname(...)))
:../DjangoApp
Source:stackexchange.com