开发者

Why can't django load multiple pages simultaneously?

开发者 https://www.devze.com 2023-01-15 09:53 出处:网络
I have a django aplication with an admin panel. When i add some item (it takes about 10 seconds to add it), i can\'t load any other page. The page is waiting for the first page to load,开发者_如何学运

I have a django aplication with an admin panel. When i add some item (it takes about 10 seconds to add it), i can't load any other page. The page is waiting for the first page to load,开发者_如何学运维 and then it load itself.


Are you using the development server? It's single-threaded by design. You'll need to run your Django app in a real web server (like Apache) to load pages simultaneously.


As Bob points out, the devserver/runserver is single-threaded, but if you want to, there is a multi-threaded local dev server option

0

精彩评论

暂无评论...
验证码 换一张
取 消