#29990: Error in part 7 of the tutorial
               Reporter:  sdabhi23       |          Owner:  sdabhi23
                   Type:  Bug            |         Status:  assigned
              Component:  Documentation  |        Version:  2.1
               Severity:  Normal         |       Keywords:  documentation
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  1
                  UI/UX:  0              |
 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:

         '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': [

Ticket URL: <https://code.djangoproject.com/ticket/29990>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to