Code

Opened 7 years ago

Closed 7 years ago

#4273 closed (invalid)

Tutorial 2 has error about default template directory name

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

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!

Attachments (0)

Change History (4)

comment:1 Changed 7 years ago by mtredinnick

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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 Changed 7 years ago by adrian

  • Summary changed from small error to Tutorial 2 has error about default template directory name

Made description more meaningful.

comment:3 Changed 7 years ago by rogerpack2005@…

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 Changed 7 years ago by Simon G. <dev@…>

  • Resolution set to invalid
  • Status changed from new to closed

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.