Opened 17 years ago

Closed 17 years ago

#4273 closed (invalid)

Tutorial 2 has error about default template directory name

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

Description

It says on page 2 of the tutorial http://www.djangoproject.com/documentation/tutorial02/ that
settings.py has a line that has a default template directory name, which directory does not exist. Actually currently it just has comments under that setting, in that file (not a fake holder), so it has changed slightly. Thanks!

Change History (4)

comment:1 by Malcolm Tredinnick, 17 years ago

Can you be a bit more specific about where this error occurs? A line number on the template02.txt file for example?

If you mean line 300, that is an example and the comment says you have to change it. Not sure how we could be more clear there; feel free to make a suggestion that isn't a lot longer. I can't find anywhere else in that source file that gives an example of anything in TEMPLATE_DIRS.

comment:2 by Adrian Holovaty, 17 years ago

Summary: small errorTutorial 2 has error about default template directory name

Made description more meaningful.

comment:3 by rogerpack2005@…, 17 years ago

ahh I get it. You say

"/home/my_username/mytemplates", # Change this to your own directory.

which means not that this line "already exists" in the template directory, but that we should add it.

I thought that it meant "go and find this line and change it" which line doesn't currently exist.
The change I would make to the tutorial would be to say

So, let’s add a NEW line to it, to tell
Django where our templates live. It will look like this:
TEMPLATE_DIRS = (

"/home/my_username/mytemplates", # Change this to your own directory.

)

Or so. The real confusion is that settings.py TEMPLATE_DIRS settings has some "other things" that are in it by default which aren't shown here, so it confused me. Thanks!

comment:4 by Simon G. <dev@…>, 17 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top