#32142 closed Bug (duplicate)
Tutorial 7 - [settings.py code error]
Reported by: | Elijah Yang | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 3.1 |
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 |
Description
In tutorial 7, https://docs.djangoproject.com/en/3.1/intro/tutorial07/
Under "Customizing your project’s templates",
'DIRS': [BASE_DIR / 'templates'],
should be
'DIRS': [BASE_DIR + '/templates'],
otherwise terminal will return an error.
Change History (3)
comment:1 by , 4 years ago
Component: | Uncategorized → Documentation |
---|---|
Type: | Uncategorized → Bug |
comment:2 by , 4 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I'm afraid it's instead your suggestion that would raise an error at runtime --
BASE_DIR
is a Path object, not a string, so the '/' operator is expected. After all, Windows and Unix-style OSes have different separators.