Code

Opened 2 years ago

Closed 2 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.

Attachments (0)

Change History (1)

comment:1 Changed 2 years ago by lukeplant

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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 2 years ago by lukeplant (previous) (diff)

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.