the PROJECT_DIR has not been defined... the PROJECT_DIR is not a variable. its a directory/ a path to where the folder "templates" is located. This should help
import os
PROJECT_DIR = os.path.dirname(os.path.dirname(__file__))
TEMPLATE_DIRS = os.path.join(PROJECT_DIR, 'templates')