Opened 13 years ago

Closed 13 years ago

#17446 closed Bug (invalid)

TEMPLATE_DIRS documentation possible error for Windows user

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

Description

In the Intro Tut 02, the section about custom templating admin, the example states

TEMPLATE_DIRS = (
    '/home/my_username/mytemplates', # Change this to your own directory.
)

The template dir has to be in double quotes? atleast for Windows users, else getting error on drive letter. "" is used at settings.py comments.

Thanks.

Change History (1)

comment:1 by Luke Plant, 13 years ago

Resolution: invalid
Status: newclosed

Python doesn't make any distinction between "a string" and 'a string', so this report has to be incorrect.

It is possible you have a ' character in your filename, in which case you'll need to escape it using a backslash, or use double quotes for delimiting the string.

Or possibly you are having problems with '\' in the path, which is the escape character, and so you need "\\". Or you can use rawstrings, but beware the trailing backslash problem. http://pythonconquerstheuniverse.wordpress.com/2008/06/04/gotcha-%E2%80%94-backslashes-in-windows-filenames/

Last edited 13 years ago by Luke Plant (previous) (diff)
Note: See TracTickets for help on using tickets.
Back to Top