#24398: Built in webserver not reloading Python files upon requests
----------------------------------+--------------------------------------
Reporter: hyperknot | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.7
Severity: Normal | Resolution:
Keywords: server runserver | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Changes (by hyperknot):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Old description:
> 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. Load the URL in browser / curl.
> 5. Change string in the view.
> 6. 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.
>
> Python version: 2.7.9, latest from homebrew
> Django version: 1.7.4, latest from pip
> OS version: OS X 10.9.5
New description:
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
--
--
Ticket URL: <https://code.djangoproject.com/ticket/24398#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.244c571fc08772a13dbd485abefec621%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.