- Run
django-admin startproject <project name>
, you'll get a root folder and a project folder in it, they both called "" - Create "apps", "static", "templates" folders in root folder.
- Edit setting.py in project folder, add dir path in it, like below:
# 设置模板目录
TEMPLATES = [
{
'DIRS': [os.path.join(BASE_DIR, 'templates')],
...
},