﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29990	Error in part 7 of the tutorial	Shrey	Shrey	"The code given at https://docs.djangoproject.com/en/2.1/intro/tutorial07/#customizing-your-project-s-templates is incorrect and misleading as the  BASE_DIR variable points to the root of the main project directory as we can see from the code snipppet:

{{{
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# BASE_DIR  points to: ...\mysite\
# The tutorial assumes that it points to: ...\mysite\mysite
}}}

Hence the code in question should be changed to:

{{{
TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(os.path.join(BASE_DIR, 'basic'), 'templates')], #This line has been changed
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]
}}}

"	Bug	closed	Documentation	2.1	Normal	invalid	documentation		Unreviewed	0	0	0	0	1	0
