Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#113 closed defect (fixed)

auto-reload broken in standalone WSGI server

Reported by: Jason Huggins Owned by: Adrian Holovaty
Component: Core (Other) Version:
Severity: normal Keywords: auto reload
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Auto reload is broken in the new standalone server (http://www.djangoproject.com/weblog/2005/jul/18/local_server/)... Let's bring auto reload back.

The code for this borrow's from Peter Hunt and the CherryPy project (www.cherrypy.org), which in turn borrows from Ian Bicking's Paste (http://pythonpaste.org/)

We'll need to check on Paste and CherryPy's licenses to make sure this is all kosher.

Attachments (5)

autoreload.py (1.7 KB ) - added by Jason Huggins 19 years ago.
This should stored in django/utils. This has only been tested with Python 2.4.1
server.py (1.4 KB ) - added by Jason Huggins 19 years ago.
This should be stored in <yourapp>/scripts/ (see inline comments in the .py file for more info)
start.bat (32 bytes ) - added by Jason Huggins 19 years ago.
A simple script for Windows to launch the django server. Should be stored in <yourapp>/scripts/
diff_output.txt (2.4 KB ) - added by Jason Huggins 19 years ago.
Here's the new patch…
management.py (20.3 KB ) - added by Jason Huggins 19 years ago.
Here's the new copy of management.py... (so you can more easily do a file compare if you want)

Download all attachments as: .zip

Change History (10)

by Jason Huggins, 19 years ago

Attachment: autoreload.py added

This should stored in django/utils. This has only been tested with Python 2.4.1

by Jason Huggins, 19 years ago

Attachment: server.py added

This should be stored in <yourapp>/scripts/ (see inline comments in the .py file for more info)

by Jason Huggins, 19 years ago

Attachment: start.bat added

A simple script for Windows to launch the django server. Should be stored in <yourapp>/scripts/

comment:1 by rmunn@…, 19 years ago

Django is BSD-licensed. CherryPy is also BSD-licensed: http://www.cherrypy.org/wiki/CherryPyLicense. And Paste is under the PSF license, a BSD/MIT-style license: http://svn.pythonpaste.org/Paste/trunk/docs/Paste.txt. IANAL, but it sure looks to me like all the code-borrowing is perfectly kosher.

comment:2 by Jason Huggins, 19 years ago

Uploading the new patch for management.py, based on adrian's refactorings to django-admin

by Jason Huggins, 19 years ago

Attachment: diff_output.txt added

Here's the new patch...

by Jason Huggins, 19 years ago

Attachment: management.py added

Here's the new copy of management.py... (so you can more easily do a file compare if you want)

comment:3 by Jason Huggins, 19 years ago

Because of the new addition of the patch to management.py, feel free to delete server.py and start.bat from this ticket.

comment:4 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

(In [266]) Added auto-reload to standalone server! Fixes #113. Thanks very much to Jason Huggins for the patch.

comment:5 by Adrian Holovaty, 19 years ago

Fixed in [266]. Thanks a lot, Jason!

Note: See TracTickets for help on using tickets.
Back to Top