Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#20480 closed Uncategorized (invalid)

Change to django tutorial docs

Reported by: cspears2002@… Owned by: nobody
Component: Documentation Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no



I was wondering if we can update the documentation here.

Specifically, I am concerned about the part of the documentation that reads as follows:

Open your settings file (mysite/, remember) and add a TEMPLATE_DIRS setting:

TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')]

TEMPLATE_DIRS is an iterable of filesystem directories to check when loading Django templates; it’s a search path.

If I just add the line:

TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')]

to the file, then I will get an error message.

The code that needs to get added to the file should like something like this:

import os.path

BASE_DIR = 'C:\Users\Chris\Documents\django_dev\mysite'
TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')]

Change History (2)

comment:1 Changed 5 years ago by Aymeric Augustin

Resolution: invalid
Status: newclosed

You must be using Django 1.5 while following the tutorial for the development version (future 1.6).

BASE_DIR is defined here:

comment:2 Changed 5 years ago by anonymous

You are correct.

C:\Users\Chris\Documents\django_dev\mysite>python runser
Validating models...

0 errors found
May 22, 2013 - 11:49:52
Django version 1.5.1, using settings 'mysite.settings'
Development server is running at
Quit the server with CTRL-BREAK.
[22/May/2013 11:50:01] "GET /admin/ HTTP/1.1" 200 1865
[22/May/2013 11:50:12] "POST /admin/ HTTP/1.1" 200 2028
[22/May/2013 11:50:19] "POST /admin/ HTTP/1.1" 302 0
[22/May/2013 11:50:19] "GET /admin/ HTTP/1.1" 200 5066
[22/May/2013 11:50:36] "GET /admin/logout/ HTTP/1.1" 200 1135

I will change BASE_DIR in my file accordingly and see how that works. Thanks!

Note: See TracTickets for help on using tickets.
Back to Top