File—》setting-----》Languages & Frameworks ------> Python Template Languages ------>Template language 选中Django 然后保存