dirs 27 base dir 2f 27templates 27 error

Solutions on MaxInterview for dirs 27 base dir 2f 27templates 27 error by the best coders in the world

showing results for - "dirs 27 base dir 2f 27templates 27 error"
Mélissa
21 Jun 2019
1Incorrect syntax in polls app tutorial by Django
2
3Use this: 
4os.path.join(BASE_DIR, 'templates')
5
6instead of this:
7BASE_DIR / 'templates'
8
9TEMPLATES = [
10    {
11        'BACKEND': 'django.template.backends.django.DjangoTemplates',
12        'DIRS': [os.path.join(BASE_DIR, 'templates')],
13        'APP_DIRS': True,
14        'OPTIONS': {
15            'context_processors': [
16                # codes...
17            ],
18        },
19    },
20]