﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24398	Built in webserver not reloading Python files upon requests	Zsolt Ero	nobody	"I am experiencing the following bug in Django 1.7.4:

1. Create a new default project
2. Create a new default app.
3. Make a view + url, just return a simple string in a HttpResponse.
4. Start ""manage.py runserver""
5. Load the URL in browser / curl.
6. Change string in the view.
7. Reload the URL in browser / re-run curl.

What should happen:
The updated contents should be shown in the browser / curl.

What is happening:
'''Sometimes''' the updated content is displayed.
'''Most of the time''' the old content is displayed.

Note 1:
If I wait a while (say 5 minutes), and reload, the updated content will be displayed.
If I do not wait, but simply click reload-reload-reload, the old content will be displayed all the time.

Note 2:
If I hit the force-reload button in the browser (by clicking Ctrl + refresh or similar), then it triggers a server reload/restart. However the result of this response is still the '''old''' content. However if I do a normal request now (so it's the 2nd request after reload), '''then''' the updated content is displayed. 

Note 3:
A very interesting, possibly related bug: if I hit Ctrl + C to quit the server and restart it, it terminates with error""

{{{
Error: That port is already in use.
}}}


To be able to restart the server I have to wait quite a while (say 20 seconds). This error seems to only happen when the server is in the ""stuck"" mode, as in displaying the old content.

Python version: 2.7.9, latest from homebrew
Django version: 1.7.4, latest from pip
OS version: OS X 10.9.5"	Bug	closed	Uncategorized	1.7	Normal	needsinfo	server runserver		Unreviewed	0	0	0	0	0	0
