我正在研究 Python REST 框架,在我的 Mac 上设置了 python 3.8.12 后,当我尝试使用python manage.py runserver
Django 的命令启动服务器时,大约需要 2 分钟,在这之间它会提供一些如下所述的连接池日志。
2021-11-26 11:24:04,249 DEBUG urllib3.connectionpool : Starting new HTTP connection (1): 169.254.169.254:80
2021-11-26 11:24:05,252 DEBUG urllib3.connectionpool : Starting new HTTP connection (2): 169.254.169.254:80
2021-11-26 11:24:06,586 DEBUG urllib3.connectionpool : Starting new HTTP connection (3): 169.254.169.254:80
2021-11-26 11:24:07,590 DEBUG urllib3.connectionpool : Starting new HTTP connection (4): 169.254.169.254:80
2021-11-26 11:24:09,527 DEBUG urllib3.connectionpool : Starting new HTTP connection (1): 169.254.169.254:80
2021-11-26 11:24:09,528 DEBUG urllib3.connectionpool : Starting new HTTP connection (2): 169.254.169.254:80
2021-11-26 11:24:09,821 DEBUG urllib3.connectionpool : Starting new HTTP connection (3): 169.254.169.254:80
2021-11-26 11:24:09,822 DEBUG urllib3.connectionpool : Starting new HTTP connection (4): 169.254.169.254:80
2021-11-26 11:24:10,154 DEBUG urllib3.connectionpool : Starting new HTTP connection (5): 169.254.169.254:80
2021-11-26 11:24:10,155 DEBUG urllib3.connectionpool : Starting new HTTP connection (6): 169.254.169.254:80
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
这是一个令人头疼的问题,因为每次更改都需要这么多时间。我在网上找不到任何解决方案。请帮忙。欢迎所有解决方案。提前致谢 ;)