在运行python manage.py runserver 出现这个提示

本来setting里面是True 我改成了False还是错误

在运行python manage.py runserver 出现这个提示


错误的意思是如果settings设置了DEBUG为False,则需要设置allowed_hosts。将DEBUG改成True试试。
具体关于django.settings,去研究一下这里:
https://docs.djangoproject.com/en/3.2/topics/settings/
以及如何设置allowed_hosts:
https://blog.csdn.net/weixin_43064185/article/details/100728949