Answers for "TEMPLATES_DIR = os.path.join(BASE_DIR, 'templates') FRONTEND_DIR = os.path.join(BASE_DIR, 'frontend')"

0

'DIRS': [os.path.join(BASE_DIR, 'templates')],

Incorrect syntax in polls app tutorial by Django

Use this: 
os.path.join(BASE_DIR, 'templates')

instead of this:
BASE_DIR / 'templates'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'templates')],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                # codes...
            ],
        },
    },
]
Posted by: Guest on November-22-2020

Code answers related to "TEMPLATES_DIR = os.path.join(BASE_DIR, 'templates') FRONTEND_DIR = os.path.join(BASE_DIR, 'frontend')"

Python Answers by Framework

Browse Popular Code Answers by Language