DEV Community

Discussion on: Understand Django: Templates For User Interfaces

Collapse
 
kylerconway profile image
Kyle R. Conway

The switch to Pathlib will throw an error unless you import os when defining the template directory. It appears this can just be changed to 'DIRS': [BASE_DIR / "templates"], to work appropriately in the Pathlib parlance.

Collapse
 
mblayman profile image
Matt Layman

Thanks for pointing that out! Times, they are a changin'!