Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
django代码400,消息错误请求版本_Django - Fatal编程技术网

django代码400,消息错误请求版本

django代码400,消息错误请求版本,django,Django,我试图实现“使用OTP保护Django管理员登录”,但是现在无法登录到管理员面板。我从任何地方都删除了该应用程序,但仍然无法运行。有什么解决办法吗 [05/Feb/2021 21:39:49] code 400, message Bad request version ('î\x9el\x00$\x13\x01\x13\x03\x13\x02À+À/̨̩À,À0À') [05/Feb/2021 21:39:49] You're accessing the development server

我试图实现“使用OTP保护Django管理员登录”,但是现在无法登录到管理员面板。我从任何地方都删除了该应用程序,但仍然无法运行。有什么解决办法吗

[05/Feb/2021 21:39:49] code 400, message Bad request version ('î\x9el\x00$\x13\x01\x13\x03\x13\x02À+À/̨̩À,À0À')
[05/Feb/2021 21:39:49] You're accessing the development server over HTTPS, but it only supports HTTP.

如果您使用的是开发版本,则无法在本地主机上使用
https
连接,因此只需将URL转到
http
,错误就会消失。 例:

https://localhost:8000

把它转到

http:localhost:8000


也可能位于
127.0.0.1:8000

,它会告诉您问题所在。您正试图通过https://而不是http来访问开发服务器,并且/或者http请求会自动重定向到https://(我认为这个库可以在我查看文档的2秒钟内完成这项工作)。