#31715 closed Bug (invalid)
Documentation : Customize the admin look and feel
| Reported by: | AbelardoLG | 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
To Customizing your project’s templates, you wrote this line:
TEMPLATES = [ {
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [BASE_DIR / 'templates'],
...
When I saved this modification, the server showed the attached log.
Attachments (1)
Change History (3)
by , 5 years ago
| Attachment: | Captura de pantalla de 2020-06-16 16-09-50.png added | 
|---|
comment:1 by , 5 years ago
| Resolution: | → invalid | 
|---|---|
| Status: | new → closed | 
This looks like BASE_DIR is a string, when you can only use / with Path objects. 
Either use a Path object or os.path.join() to join (string) path segments correctly. (You can concatenate with + '/' + like normal strings, but that not OS independent, and likely error prone.) 
Please see TicketClosingReasons/UseSupportChannels if you need more help. 
comment:2 by , 5 years ago
The instructions should work if you're using a project created with the same version of Django as the docs you're reading. 
The tutorial was updated in 26554cf5d1e96db10d0d5f4b69683a22fb82fdf8 which will be/was in 3.1 — in general full pathlib support isn't available until then. See #29983. 
Python's server outputs a log about this error