1.当我把 DEBUG = True设为False的时候运行 python manage.py runserver 的时候 报错 : CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False. 解决方案: ALLOWED_HOSTS = ['127.0.0.1', 'localhost'] 2.报错信息: ModelForm Creating a ModelForm without either the 'fields…