If you've started a new Django 3.1+ project and are using older tutorials or guides, it's likely to come across the following error on your command line:
NameError: name 'os' is not defined
The quick fix is to
import os at the top of your
# settings.py import os # new from pathlib import Path
The better fix is learn more about how
pathlib works and update your
STATICFILES_DIRS, and other files to use the newer, modern approach.