How come sometimes Django's development server hangs?
And just keeps "waiting for s开发者_如何学JAVAerver..."
Because it's single-threaded, and you're making a second request to it from server code. Use a multithreaded or multiprocessed web server for testing instead.
EDIT:
This issue was fixed about 5 months after this question was asked; this answer no longer applies to newer versions.
Your problem might be a different reason, but at least in my case, it was due to Avast antivirus, see https://stackoverflow.com/a/47362725/122441
As a precaution, turn off your antivirus temporarily, restart runserver and see if the problem persists. At least you've eliminated one potential issue.
精彩评论