TEMPLATES = [ {
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [BASE_DIR / 'templates'],
...
When I saved this modification, the server showed the attached log.
--
Ticket URL: <https://code.djangoproject.com/ticket/31715>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "Captura de pantalla de 2020-06-16 16-09-50.png" added.
Python's server outputs a log about this error
* status: new => closed
* resolution: => invalid
Comment:
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/31715#comment:1>
Comment (by Carlton Gibson):
The instructions should work is 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.
--
Ticket URL: <https://code.djangoproject.com/ticket/31715#comment:2>